Part Number Hot Search : 
A1511RU 78S15 0N60C3 SAB80 SM5874AM 00145 RT1404B6 DM74L
Product Description
Full Text Search
 

To Download M34551M4-XXXFP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  single-chip 4-bit cmos microcomputer for infrared remote control transmitter description the 4551 group is a 4-bit single-chip microcomputer designed with cmos technology. its cpu is that of the 4500 series using a simple, high-speed instruction set. the computer is equipped with an 8-bit timer with a reload register, a 14-bit timer which is also used as a watchdog timer, a 4-bit timer with a reload register, a carrier wave output circuit and an lcd control circuit. the mask rom version and built-in prom version of 4551 group are produced as shown in the table below. features l minimum instruction execution time ............................. 3.0 m s (f(x in )=4.0 mhz, v dd =3.0 v, system clock = f(x in )/4) l supply voltage ............................. 2.5 v to 5.5 v (one time prom version) ....................................... 2.2 v to 5.5 v (mask rom version) l system clock switch function ........................................... clock divided by 4 or not divided l lcd control circuit segment output ................................................................... 20 common output .................................................................... 4 l carrier wave frequency switch function system clock, system clock/2, system clock/8, system clock/12, system clock/16, system clock/24, h fixed l timers timer 1 ................................ 8-bit timer with a reload register timer 2 ............... 14-bit timer also used as a watchdog timer timer lc ............................. 4-bit timer with a reload register l interrupt ................................................................... 3 sources l voltage drop detection circuit ............................................... 1 l clock generating circuit (ceramic resonance and quartz-crystal oscillation) application remote control transmitter product M34551M4-XXXFP m34551e8-xxxfp (note) rom type mask rom one time prom package 48p6s-a 48p6s-a ram size ( 5 4 bits) 280 words 280 words rom (prom) size ( 5 10 bits) 4096 words 8192 words note: shipped after writing (shipped in blank: m34551e8fp) pin configuration (top view) M34551M4-XXXFP outline 48p6s-a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 38 37 36 35 34 33 32 31 30 29 28 27 26 25 15 16 17 18 19 20 21 22 23 24 48 47 46 45 44 43 42 41 40 39 seg 2 seg 3 seg 4 seg 5 seg 6 seg 7 seg 8 com 2 com 3 seg 0 seg 1 M34551M4-XXXFP seg 11 seg 14 seg 15 seg 9 v ss x out x in p1 0 p1 1 p1 2 p1 3 d 1 d 2 d 3 d 4 p0 0 p0 1 p0 2 p0 3 d 0 reset d 7 /x cout d 6 /x cin carr v dd cnv ss v ss d 5 / int com 1 com 0 seg 10 seg 13 seg 12 p2 3 / seg 19 p2 2 / seg 18 p2 0 / seg 16 p2 1 / seg 17 mitsubishi microcomputers 4551 group
2 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter block diagram ram 280 words 5 4 bits (lcd ram 20 words 5 4 bits included) rom (note) 4096 to 8192 words 5 10 bits port p0 port p1 4500 series cpu core memory i/o port internal peripheral functions lcd drive control circuit (max. 20 segments 5 4 common) timers timer 1 (8 bits) system clock generating circuit timer 2 (14 bits) x in Cx out (main clock) x cin Cx cout (sub-clock) remote control carrier wave output register b (4 bits) register a (4 bits) register d (3 bits) register e (8 bits) stack registers sks (8 levels) interrupt stack register sdp(1 level) alu(4 bits) port d port p2 8 4 4 4 timer lc (4 bits) segment output common output 4 20 note: prom 8192 words 5 10 bits
3 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter performance overview function 92 1.5 m s (f(x in ) = 8.0 mhz:system clock = f(x in )/4: v dd = 5.0 v) 4096 words 5 10 bits 8192 words 5 10 bits 280 words 5 4 bits (lcd ram 20 words 5 4 bits included) eight independent output ports 4-bit i/o port; each pin is equipped with a pull-up function. 4-bit i/o port; each pin is equipped with a pull-up function. 4-bit input port 1-bit output port (cmos output) 8-bit timer with a reload register 14-bit timer/ fixed dividing frequency timer 4-bit timer with a reload register 3 (one for external and two for timer) 1 level 8 levels (however, only 7 levels can be used when an interrupt is used or the tabp p instruction is executed) 1/2, 1/3 bias 2, 3, 4 duty 4 20 200 k w 5 3 cmos silicon gate 48-pin plastic molded qfp C20 c to 70 c 2.2 v to 5.5 v (one time prom version: 2.5 v to 5.5 v) 2.5 ma (f(x in ) = 8.0 mhz system clock = f(x in )/4, v dd =5 v) 27.5 m a (at main clock oscillation stop, sub-clock oscillation frequency: 32.0 khz, v dd =5 v) 0.1 m a (at main clock oscillation stop, sub-clock oscillation stop, ta=25 c, v dd =5v) parameter number of basic instructions minimum instruction execution time memory sizes input/output ports timers interrupt subroutine nesting lcd device structure package operating temperature range supply voltage power dissipation (typical value) rom ram d 0 Cd 7 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 Cp2 3 carr timer 1 timer 2/ watchdog timer timer lc sources nesting selective bias value selective duty value common output segment output internal resistor for power supply at active at clock operating at ram back-up m34551m4 m34551e8 output i/o i/o input output definition of clock and cycle l system clock (stck) the system clock is the basic clock for controlling this product. the system clock can be selected by bits 0 and 3 of the clock control register mr as shown in the table below. table selection of system clock l instruction clock (instk) the instruction clock is the standard clock for controlling cpu. the instruction clock is a signal derived from dividing the system clock by 3. the one cycle of the instruction clock is equivalent to the one machine cycle. l machine cycle the machine cycle is the standard cycle required to execute the instruction. note: f(x in )/4 is selected immediately after system is released from reset. register mr mr 3 0 0 1 1 mr 0 0 1 0 1 system clock (stck) f(x in ) f(x cin ) f(x in )/4 f(x cin )/4
4 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter pin description name power supply ground cnv ss reset input main clock input main clock output output port d output port d output port d output port d i/o port p0 i/o port p1 input port p2 carrier wave output for remote control segment output common output pin v dd v ss cnv ss reset x in x out d 0 Cd 4 d 5 /int d 6 /x cin d 7 /x cout p0 0 Cp0 3 p1 0 Cp1 3 p2 0 /seg 16 C p2 3 /seg 19 carr seg 0 C seg 15 com 0 C com 3 input/output input i/o input output output i/o i/o output i/o i/o i/o output output output function connected to a plus power supply. connected to a 0 v power supply. connect cnv ss to v ss and apply l (0v) to cnv ss certainly. an n-channel open-drain i/o pin for a system reset. a pull-up resistor is built-in this pin. when the watchdog timer causes the system to be reset or the low- supply voltage is detected, the reset pin outputs l level. i/o pins of the main clock generating circuit. a ceramic resonator can be connected between x in pin and x out pin. a feedback resistor is built-in between them. each pin of port d has an independent 1-bit wide output function. the output structure is n-channel open-drain. 1-bit output port. port d 5 is also used as an int input pin. when d 5 /int pin is used as the int input pin, set the output latch to 1. the output structure is n- channel open-drain. each pin of port d has an independent 1-bit output function. ports d 6 and d 7 are also used as pins x cin and x cout for the sub-clock generating circuit, respectively. when pins d 6 /x cin and d 7 /x cout are used as the pins for the sub-clock generating circuit, a 32.0 khz quartz-crystal oscillator can be connected between x cin pin and x cout pin. a feedback resistor is built-in between them. 4-bit i/o port. it can be used as an input port when the output latch is set to 1. the output structure is n-channel open-drain. every pin of the ports has a key-on wakeup function and a pull-up function. 4-bit i/o port. it can be used as an input port when the output latch is set to 1. the output structure is n-channel open-drain. every pin of the ports has a key-on wakeup function and a pull-up function. both functions can be switched by software. 4-bit input port. ports p2 0 Cp2 3 are also used as the segment output pins seg 16 C seg 19 , respectively. carrier wave output pin for remote control transmit. the output structure is the cmos circuit. lcd segment output pins. lcd common output pins. pins com 0 and com 1 are used at 1/2 duty, pins com 0 C com 2 are used at 1/3 duty and pins com 0 Ccom 3 are used at 1/4 duty.
5 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter multifunction notes 1: pins except above have just single function. 2: the port d 5 is the output port and ports p2 0 Cp2 3 are the input ports. connections of unused pins connection connect to v ss , or set the output latch to 0 and open. select ports d 6 and d 7 and connect to v ss , or set the output latch to 0 and open. select port p2 and connect to v ss , or select the segment output function and open. connection open open open set the output latch to 1 and open. open or connect to v ss (note) pin carr seg 0 Cseg 15 com 0 Ccom 3 p0 0 Cp0 3 p1 0 Cp1 3 pin d 0 Cd 4 d 5 /int d 6 /x cin d 7 /x cout p2 0 / seg 16 Cp2 3 / seg 19 pin d 5 d 6 d 7 p2 0 p2 1 p2 2 p2 3 multifunction int x cin x cout seg 16 seg 17 seg 18 seg 19 multifunction d 5 d 6 d 7 p2 0 p2 1 p2 2 p2 3 pin int x cin x cout seg 16 seg 17 seg 18 seg 19 port function port port d port p0 port p1 port p2 control bits 1 4 4 4 control instructions sd rd cld op0a iap0 op1a iap1 iap2 control registers mr pu0 output structure n-channel open-drain n-channel open-drain n-channel open-drain input/ output output (8) i/o (4) i/o (4) input (4) remark pull-up functions key-on wakeup functions pull-up functions (programmable) key-on wakeup functions (programmable) pin d 0 Cd 4 , d 5 /int, d 6 /x cin , d 7 /x cout p0 0 Cp0 3 p1 0 Cp1 3 p2 0 /seg 16 C p2 3 /seg 19 note: in order to connect ports p1 0 Cp1 3 to v ss , turn off their pull-up transistors (pull-up control register pu0 i =0) by software. in order to make these pins open, turn on their pull-up transistors (register pu0 i =1) by software, or turn off their pull-up transistors (register pu0i=0) and set the output latch to 0 ( i = 0, 1, 2, or 3 ). be sure to select the key-on wakeup function and the pull-up function with every one port. (note in order to set the output latch to 0 and make pins open) ? after system is released from reset, a port is in a high-impedance state until the output latch of the port is set to 0 by software. accordingly, the voltage level of pins is undefined and the excess of the supply current may occur. ? to set the output latch periodically is recommended because the value of output latch may change by noise or a program run away (caused by noise). (note in order to connect unused pins to v ss or v dd ) ? to avoid noise, connect the unused pins to v ss or v dd at the shortest distance using a thick wire.
6 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter port block diagrams d t q key-on wakeup input register a ai iap0 instruction ai pull-up transistor p0 0 ?0 3 (note 1) op0a instruction d t q op1a instruction key-on wakeup input register a ai iap1 instruction pull-up transistor ai p1 0 ?1 3 pu0i (note 1) connected to when selecting seg lcd power supply lcd power supply l2 i register a iap2 instruction lcd control signal p2 0 /seg 16 ?2 3 /seg 19 (note 1) register y decoder sd instruction rd instruction s rq cld instruction d 0 ? 4 register y decoder sd instruction rd instruction s r q cld instruction d 5 /int int input (note 1) (note 1) this symbol represents a parasitic diode. notes 1: i represents bit 0, 1, 2 or 3. 2: mr 2 mr 2 0 1 mr 2 0 1 d 7 /x cout mr 2 d 6 /x cin x cin clock register y decoder sd instruction rd instruction s rq cld instruction register y decoder sd instruction rd instruction s rq cld instruction (note 1) (note 1)
7 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter port block diagrams (continued) seg 0 ?eg 15 lcd power supply lcd power supply lcd control signal lcd control signal pch nch com 0 ?om 3 lcd control signal lcd control signal pch lcd control signal lcd control signal nch pch nch lcd power supply lcd power supply lcd power supply this symbol represents a parasitic diode. note: stcr instruction spcr instruction s r q cr flag carrier wave output circuit register c1 tc1a instruction w3 1 timer lc underflow signal f/f w3 0 c2 0 timer 1 underflow signal w2 0 carr to timer 1 carry (note) f/f
8 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 1 amc instruction execution example fig. 2 rar instruction execution example fig. 3 registers a, b and register e function block operations cpu (1) arithmetic logic unit (alu) the arithmetic logic unit alu performs 4-bit arithmetic such as 4-bit data addition, comparison, and operation, or operation, and bit manipulation. (2) register a and carry flag (cy) register a is a 4-bit register used for arithmetic, transfer, exchange, and i/o operation. carry flag cy is a 1-bit flag that is set to 1 when there is a carry with the amc instruction (figure 1). it is unchanged with both a n instruction and am instruction. the value of a 0 is stored in carry flag cy with the rar instruction (figure 2). carry flag cy can be set to 1 with the sc instruction and cleared to 0 with the rc instruction. (3) registers b and e register b is a 4-bit register used for temporary storage of 4- bit data, and for 8-bit data transfer together with register a. register e is an 8-bit register. it can be used for 8-bit data transfer with register b used as the high-order 4 bits and register a as the low-order 4 bits (figure 3). (4) register d register d is a 3-bit register. it is used to store a 7-bit rom address together with register a and is used as a pointer within the specified page when the tabp p, bla p, or bmla p instruction is executed (figure 4). (cy) (m(dp)) (a) addition alu cy a 3 a 2 a 1 a 0 a 0 cy a 3 a 2 a 1 rar instruction sc instruction rc instruction a 3 a 2 a 1 a 0 b 3 b 2 b 1 b 0 e 7 e 6 e 5 e 4 e 3 e 2 e 1 e 0 a 3 a 2 a 1 a 0 b 3 b 2 b 1 b 0 tab instruction teab instruction tabe instruction tba instruction register b register a register b register a register e specifying address tabp p instruction p 6 p 5 p 4 p 3 p 2 p 1 p 0 pc h dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 pc l immediate field value p the contents of register d rom 840 middle-order 4 bits low-order 4 bits register a (4) register b (4) the contents of register a fig. 4 tabp p instruction execution example
9 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 5 stack registers (sks) structure fig. 6 example of operation at subroutine call (5) stack registers (sk s ) and stack pointer (sp) stack registers (sks) are used to temporarily store the contents of program counter (pc) just before branching until returning to the original routine when; ? branching to an interrupt service routine (referred to as an interrupt service routine), ? performing a subroutine call, or ? executing the table reference instruction (tabp p). stack registers (sks) are eight identical registers, so that subroutines can be nested up to 8 levels. however, one of stack registers is used when using an interrupt service routine or when executing a table reference instruction. accordingly, be careful not to stack over when performing these operations together. the contents of registers sks are destroyed when 8 levels are exceeded. the register sk nesting level is pointed automatically by 3- bit stack pointer (sp). the contents of the stack pointer (sp) can be transferred to register a with the tasp instruction. figure 5 shows the stack registers (sks) structure. figure 6 shows the example of operation at subroutine call. (6) interrupt stack register (sdp) interrupt stack register (sdp) is a 1-stage register. when an interrupt occurs, this register (sdp) is used to temporarily store the contents of data pointer, carry flag, skip flag, register a, and register b just before an interrupt until returning to the original routine. unlike the stack registers (sks), this register (sdp) is not used when executing the subroutine call instruction and the table reference instruction. (7) skip flag skip flag controls skip decision for the conditional skip instructions and continuous described skip instructions. when an interrupt occurs, the contents of skip flag is stored automatically in the interrupt stack register (sdp) and the skip condition is retained. returning to the bm instruction execution address with the rt instruction, and the bm instruction is equivalent to the nop instruction. (sp) 0 (sk 0 ) 0001 16 (pc) sub1 main program 0002 16 nop address 0000 16 nop 0001 16 bm sub1 subroutine sub1 : nop rt (pc) (sk 0 ) (sp) 7 note: sk 0 sk 1 sk 2 sk 3 sk 4 sk 5 sk 6 sk 7 (sp) = 0 (sp) = 1 (sp) = 2 (sp) = 3 (sp) = 4 (sp) = 5 (sp) = 6 (sp) = 7 program counter (pc) executing the return or table reference instruction executing the subroutine call or table reference instruction stack pointer (sp) points 7 at reset or returning from ram back-up mode. it points 0 by executing the first bm instruction, and the contents of program counter is stored in sk 0 . when the bm instruction is executed after eight stack registers are used ((sp) = 7), (sp) = 0 and the contents of sk 0 is destroyed.
10 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 7 program counter (pc) structure fig. 8 data pointer (dp) structure fig. 9 sd instruction execution example (8) program counter (pc) program counter (pc) is used to specify a rom address (page and address). it determines a sequence in which instructions stored in rom are read. it is a binary counter that increments the number of instruction bytes each time an instruction is executed. however, the value changes to a specified address when branch instructions, subroutine call instructions, return instructions, or the table reference instruction (tabp p) is executed. program counter consists of pc h (most significant bit to bit 7) which specifies to a rom page and pc l (bits 6 to 0) which specifies an address within a page. after it reaches the last address (address 127) of a page, it specifies address 0 of the next page (figure 7). make sure that the pc h does not specify after the last page of the built-in rom. (9) data pointer (dp) data pointer (dp) is used to specify a ram address and consists of registers z, x, and y. register z specifies a ram file group, register x specifies a file, and register y specifies a ram digit (figure 8). register y is also used to specify the port d bit position. when using port d, set the port d bit position to register y certainly and execute the sd, rd, or szd instruction (figure 9). z 1 z 0 x 3 x 2 x 1 x 0 y 3 y 2 y 1 y 0 data pointer (dp) register z (2) register x (4) register y (4) specifying ram digit specifying ram file specifying ram file group p 5 p 4 p 3 p 2 p 1 p 0 a 6 a 5 a 4 a 3 a 2 a 1 a 0 program counter (pc) pc h specifying page pc l specifying address p 6 01 01 1 set specifying bit position port d output latch register y (4) d 5 d 4 d 0 d 6 d 7
11 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter program memory (rom) 1 word of rom is composed of 10 bits. rom is separated every 128 words by the unit of page (addresses 0 to 127). table 1 shows the rom size and pages. figure 10 shows the rom map of m34551e8. table 1 rom size and pages product m34551m4 m34551e8 rom size ( 5 10 bits) 4096 words 8192 words pages 32 (0 to 31) 64 (0 to 63) a top part of page 1 (addresses 0080 16 to 00ff 16 ) is reserved for interrupt addresses (figure 11). when an interrupt occurs, the address (interrupt address) corresponding to each interrupt is set in the program counter, and the instruction at the interrupt address is executed. when using an interrupt service routine, write the instruction generating the branch to that routine at an interrupt address. page 2 (addresses 0100 16 to 017f 16 ) is the special page for subroutine calls. subroutines written in this page can be called from any page with the 1-word instruction (bm). subroutines extending from page 2 to another page can also be called with the bm instruction when it starts on page 2. rom pattern (bits 7 to 0) of all addresses can be used as data areas with the tabp p instruction. fig. 10 rom map of m34551e8 90 87654321 interrupt address page 0000 16 0080 16 017 f 16 subroutine special page 007 f 16 00 ff 16 0100 16 1 fff 16 0180 16 page 1 page 2 page 0 page 3 page 63 0 fff 16 page 31 fig. 11 interrupt address page (addresses 0080 16 to 00ff 16 ) structure 90 87654321 external 0 interrupt address 0080 16 0084 16 timer 1 interrupt address timer 2 interrupt address 0086 16 00ff 16
12 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter data memory (ram) 1 word of ram is composed of 4 bits, but 1-bit manipulation (with the sb j, rb j, and szb j instructions) is enabled for the entire memory area. a ram address is specified by a data pointer. the data pointer consists of registers z, x, and y. set a value to the data pointer certainly when executing an instruction to access ram. ram includes the area corresponding to the lcd. a segment is turned on automatically when 1 is written in the bit corresponding to the segment. table 2 shows the ram size. figure 12 shows the ram map. table 2 ram size product m34551m4 m34551e8 ram size 280 words 5 4 bits (1120 bits) register y register z register x 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 1 7 ram 280 words 5 4 bits (1120 bits) 23 615 280 words 012 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 the area marked ?(z = 1, x = 0 to 2, y = 0 to 7) is not a memory area. the numbers in the shaded area indicate the corresponding segment output pin numbers. notes 1: 2: fig. 12 ram map
13 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter interrupt function the interrupt type is a vectored interrupt branching to an individual address (interrupt address) according to each interrupt source. an interrupt occurs when the following 3 conditions are satisfied. ? interrupt enable flag (inte) = 1 (interrupt enabled) ? interrupt enable bit = 1 (interrupt request occurrence enabled) ? an interrupt activated condition is satisfied (request flag = 1) table 3 shows interrupt sources. (refer to each interrupt request flag for details of activated conditions.) (1) interrupt enable flag (inte) the interrupt enable flag (inte) controls whether the every interrupt enable/disable. interrupts are enabled when inte flag is set to 1 with the ei instruction and disabled when inte flag is cleared to 0 with the di instruction. when any interrupt occurs, the inte flag is automatically cleared to 0, so that other interrupts are disabled until the ei instruction is executed. (2) interrupt enable bits (v1 0 Cv1 3 ) use an interrupt enable bit of interrupt control register v1 to select the corresponding interrupt request or skip instruction. table 4 shows the interrupt request flag, interrupt enable bit and skip instruction. table 5 shows the interrupt enable bit function. (3) interrupt request flag when the activated condition for each interrupt is satisfied, the corresponding interrupt request flag is set to 1. each interrupt request flag is cleared to 0 when either; ? an interrupt occurs, or ? the next instruction is skipped with a skip instruction. each interrupt request flag is set when the activated condition is satisfied even if the interrupt is disabled by the inte flag or its interrupt enable bit. once set, the interrupt request flag retains set until a clear condition is satisfied. accordingly, an interrupt occurs when the interrupt disable state is released while the interrupt request flag is set. if more than one interrupt request flag is set when the interrupt disable state is released, the interrupt priority level is as follows shown in table 3. table 3 interrupt sources priority level 1 2 3 interrupt address address 0 in page 1 address 4 in page 1 address 6 in page 1 interrupt name external 0 interrupt timer 1 interrupt timer 2 interrupt activated condition level change of int pin timer 1 underflow timer 2 underflow table 4 interrupt request flag, interrupt enable bit and skip instruction interrupt name external 0 interrupt timer 1 interrupt timer 2 interrupt skip instruction snz0 snzt1 snzt2 request flag exf0 t1f t2f enable bit v1 0 v1 2 v1 3 table 5 interrupt enable bit function skip instruction invalid valid interrupt enable bit 1 0 occurrence of interrupt request enabled disabled
14 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter ?program counter (pc) ..................................................... each interrupt address ?stack register (sk) ........... the address of main routine to be executed when returning ?interrupt enable flag (inte) ........................................................ 0 (interrupt disabled) ? interrupt request flag (only the flag for the current interrupt source) ........................................................................................ 0 ?data pointer, carry flag, registers a and b, skip flag ............... stored in the interrupt stack register (sdp) automatically fig. 13 program example of interrupt processing (4) internal state during an interrupt the internal state of the microcomputer during an interrupt is as follows (figure 14). ? program counter (pc) an interrupt address is set in program counter. the address to be executed when returning to the main routine is automatically stored in the stack register (sk). ? interrupt enable flag (inte) inte flag is cleared to 0 so that interrupts are disabled. ? interrupt request flag only the request flag for the current interrupt source is cleared to 0. ? data pointer, carry flag, skip flag, registers a and b the contents of these registers and flags are stored automatically in the interrupt stack register (sdp). (5) interrupt processing when an interrupt occurs, a program at an interrupt address is executed after a branch to a sequence for storing data into stack register is performed. write the branch instruction to an interrupt service routine at an interrupt address. use the rti instruction to return to main routine. interrupt enabled by executing the ei instruction is performed after executing 1 instruction (just after the next instruction is executed). accordingly, when the ei instruction is executed just before the rti instruction, interrupts are enabled after returning to the main routine. (refer to figure 13) fig. 14 internal state when interrupt occurs fig. 15 interrupt system diagram ei rti interrupt service routine interrupt occurs interrupt is enabled main routine : interrupt enabled state : interrupt disabled state t1f v1 2 exf0 v1 0 address 4 in page 1 address 0 in page 1 t2f v1 3 address 6 in page 1 timer 1 underflow request flag (state retained) enable bit enable flag activated condition int pin (l ? h or h ? l input) inte timer 2 underflow
15 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter (6) interrupt control register l interrupt control register v1 interrupt enable bits of external 0, timer 1 and timer 2 are assigned to register v1. set the contents of this register through register a with the tv1a instruction. the tav1 instruction can be used to transfer the contents of register v1 to register a. table 6 interrupt control register v1 3 v1 2 v1 1 v1 0 timer 2 interrupt enable bit timer 1 interrupt enable bit not used external 0 interrupt enable bit 0 1 0 1 0 1 0 1 interrupt disabled (snzt2 instruction is valid) interrupt enabled (snzt2 instruction is invalid) interrupt disabled (snzt1 instruction is valid) interrupt enabled (snzt1 instruction is invalid) this bit has no function, but read/write is enabled. interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) interrupt control register v1 at reset : 0000 2 at power down : 0000 2 r/w note: r represents read enabled, and w represents write enabled. (7) interrupt sequence interrupts occur only when the respective inte flag, interrupt enable bits (v1 0 Cv1 3 ), and interrupt request flags (exf0, t1f, t2f) are 1. the interrupt actually occurs 2 to 3 machine cycles after the cycle in which all three conditions are satisfied. the interrupt occurs after 3 machine cycles only when the three interrupt conditions are satisfied on execution of other than one-cycle instructions (refer to figure 16). fig. 16 interrupt sequence the address is stacked to the last cycle. this interval of cycles depends on the executed instruction at the time when each interrupt activated condition is satisfied. 2 to 3 machine cycles (note 1, 2) software starts from the interrupt address. flag cleared interrupt enabled state ei instruction execution cycle interrupt enable flag (inte) retaining level for 4 cycles or more of stck is necessary. interrupt disabled state exf0 flag t1f, t2f flags int pin external interrupt timer 1 and timer 2 interrupts interrupt activated condition is satisfied. l when an interrupt request flag is set after its interrupt is enabled 1 machine cycle system clock (stck) ? ? ? ? ? ? ? ? notes 1: 2:
16 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter external interrupts an external interrupt request occurs when a valid waveform (= waveform causing the external 0 interrupt) is input to an interrupt input pin (edge detection). the external 0 interrupt can be controlled with the interrupt control register i1. table 7 external interrupt activated condition name external 0 interrupt input pin d 5 /int valid waveform falling waveform (h ? l) rising waveform (l ? h) valid waveform selection bit (i1 2 ) 0 1 fig. 17 external interrupt circuit structure one-sided edge detection circuit exf0 i1 2 d 5 /int 0 1 skip snzi0 instruction external 0 interrupt falling rising
17 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter (1) external 0 interrupt request flag (exf0) external 0 interrupt request flag (exf0) is set to 1 when a valid waveform is input to d 5 /int pin. the valid waveforms causing the interrupt must be retained at their level for 4 cycles or more of the system clock (refer to figure 16). the state of exf0 flag can be examined with the skip instruction (snz0). use the interrupt control register v1 to select the interrupt or the skip instruction. the exf0 flag is cleared to 0 when an interrupt occurs or when the next instruction is skipped with the skip instruction. the d 5 /int pin need not be selected the external interrupt input int function or the normal output port d 5 function. however, the exf0 flag is set to 1 when a valid waveform output from port d 5 is input to int pin even if it is used as an output port d 5 . l external 0 interrupt activated condition external 0 interrupt activated condition is satisfied when a valid waveform is input to d 5 /int pin. the valid waveform can be selected from rising waveform or falling waveform. an example of how to use the external 0 interrupt is as follows. select the valid waveform with the bit 2 of register i1. clear the exf0 flag to 0 with the snz0 instruction. a set the nop instruction for the case when a skip is performed with the snz0 instruction. ? set both the external 0 interrupt enable bit (v1 0 ) and the inte flag to 1. the external 0 interrupt is now enabled. now when a valid waveform is input to the d 5 /int pin, the exf0 flag is set to 1 and the external 0 interrupt occurs. (2) external interrupt control register l interrupt control register i1 register i1 controls the valid waveform for the external 0 interrupt. set the contents of this register through register a with the ti1a instruction. the tai1 instruction can be used to transfer the contents of register i1 to register a. table 8 external interrupt control register notes 1: r represents read enabled, and w represents write enabled. 2: depending on the input state of d 5 /int pin, the external interrupt request flag exf0 may be set to 1 when the contents of i1 2 is changed. accordingly, set a value to bit 2 of register i1 and execute the snz0 instruction to clear the exf0 flag after executing at least one instruction. i1 3 i1 2 i1 1 i1 0 not used interrupt valid waveform for int pin selection bit (note 2) not used not used 0 1 0 1 0 1 0 1 this bit has no function, but read/write is enabled. falling waveform (l level of int pin is recognized with the snzi0 instruction) rising waveform (h level of int pin is recognized with the snzi0 instruction) this bit has no function, but read/write is enabled. this bit has no function, but read/write is enabled. interrupt control register i1 r/w at reset : 0000 2 at power down : state retained
18 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter timers the 4551 group has the programmable timers. l programmable timer the programmable timer has a reload register and enables the frequency dividing ratio to be set. it is decremented from a set value n. when it underflows (count to n + 1), a timer interrupt request flag is set to 1, new data is loaded from the reload register, and count continues (auto-reload function). l fixed dividing frequency timer the fixed dividing frequency timer has the fixed frequency dividing ratio (n). an interrupt request flag is set to 1 every n count of a count pulse. fig. 18 auto-reload function the 4551 group timer consists of the following circuits. ? prescaler : frequency divider ? timer 1 : 8-bit programmable timer ? timer 2 : 14-bit fixed dividing frequency timer ? timer lc : 4-bit programmable timer (timers 1 and 2 have the interrupt function, respectively) table 9 function related timers prescaler, timer 1, timer 2 and timer lc can be controlled with the timer control registers w1, w2 and w3. each function is described below. count source ? instruction clock (instck) ? prescaler output (orclk) ? carrier generating circuit output (carry, carry/2) ? prescaler output (orclk) ? f(x cin ) ? bit 3 of timer 2 ? system clock (stck) structure frequency divider 8-bit programmable binary down counter 14-bit fixed dividing frequency 4-bit programmable binary down counter circuit prescaler timer 1 timer 2 timer lc use of output signal ? timer 1 and 2 count sources ? timer 1 interrupt ? port carr output control ? timer 2 interrupt ? divider for lcd ? watchdog timer ? divider for lcd ? carrier output frequency dividing ratio 4, 8 1 to 256 16384 1 to 16 control register w1 w1 w2 w2 w3 ff 16 n 00 16 n : counter initial value count starts reload reload 1st underflow 2nd underflow n+1 count n+1 count time an interrupt occurs or a skip instruction is executed. timer 1 interrupt request flag the contents of counter ? ?
19 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 19 timers structure frequency dividing circuit (divided by 3) x in x cin timer 1 interrupt t1f instck orclk carrier wave output control frequency dividing circuit (divided by 4) reload register r1 (8) timer 1 (8) register b register a (t1ab) (tab1) (note 1) 0 1 w2 0 mr0 0 1 w1 1 , w1 0 00, 01 10 11 1/4 1/8 w1 3 0 1 0 1 w1 2 prescaler orclk mr 3 0 1 (note 2) 1 2 stck carry count source is stopped by setting to 0. when the t1ab instruction is executed after setting w2 0 to 1, data is written only to reload register r1. when the contents of w2 3 changes from 0 to 1, the count value of timer 2 is initialized. timer 2 1 2 timer lc (4) reload register lc (4) lcd clock count source orclk timer 2 interrupt t2f count source w2 3 0 1 w2 2, w2 1 00 01 not available q r s wef reset signal wrst instruction system reset to port carr 10,11 (note 1) 0 1 w3 0 1 0 w3 1 1 03 25 47 69 81213 10 11 stck q d t wdf (note 3) notes 1: 2: 3:
20 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter table 10 timer control registers prescaler control bit prescaler dividing ratio selection bit timer 1 count source selection bits timer control register w1 w1 3 w1 2 w1 1 w1 0 at reset : 0000 2 at power down : 0000 2 0 1 0 1 r/w stop (prescaler state initialized) operating instruction clock (instck) divided by 4 instruction clock (instck) divided by 8 count source prescaler output (orclk) carrier output (carry) carrier output divided by 2 (carry/2) w1 1 0 0 1 1 w1 0 0 1 0 1 timer control register w2 at reset : 1000 2 at power down : C C C 0 2 r/w 0 1 f(x cin ) prescaler output (orclk) w2 3 w2 2 w2 1 w2 0 timer 2 count source selection bit timer 2 count value selection bits timer 1 control bit w2 2 0 0 1 1 w2 1 0 1 0 1 count source underflow occur every 2 14 count underflow occur every 2 13 count not available not available stop (timer 1 state retained) operating 0 1 timer control register w3 at reset : 00 2 at power down : state retained r/w 0 1 0 1 bit 3 of timer 2 is output (timer 2 count source divided by 16) state clock (stck) stop (timer lc state retained) operating w3 1 w3 0 timer lc count source selection bit timer lc control bit note: r represents read enabled, and w represents write enabled. C represents state retained. (1) timer control registers l timer control register w1 register w1 controls the count source of timer 1, the frequency dividing ratio and count operation of prescaler. set the contents of this register through register a with the tw1a instruction. the taw1 instruction can be used to transfer the contents of register w1 to register a. l timer control register w2 register w2 controls the count operation of timer 1 and count operation and count source of timer 2. set the contents of this register through register a with the tw2a instruction. the taw2 instruction can be used to transfer the contents of register w2 to register a. l timer control register w3 register w3 controls the count operation and count source of timer lc. set the contents of this register through register a with the tw3a instruction. the taw3 instruction can be used to transfer the contents of register w3 to register a.
21 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter (2) precautions note the following for the use of timers. l prescaler stop the prescaler operation to change its frequency dividing ratio. l count source stop timer 1 or timer lc counting to change its count source. when timer 2 count source changes from f(x cin ) to orclk (w2 3 = 0 ? w2 3 = 1), the count value of timer 2 is initialized. however, when timer 2 count source changes from orclk to f(x cin ) (w2 3 = 1 ? w2 3 = 0) or the same count source is set again (w2 3 = 0 ? w2 3 = 0 or w2 3 = 1 ? w2 3 = 1), the count value of timer 2 is not initialized. l timer 2 timer 2 has the watchdog timer function (wdt). when timer 2 is used as the wdt, note that the processing to initialize the count value and the execution of the wrst instruction. l reading the count value stop the prescaler and then execute the tab1 instruction to read timer 1 data. l writing to reload register r1 when writing data to reload register r1 while timer 1 is operating, avoid a timing when timer 1 underflows. (3) prescaler prescaler is a frequency divider. its frequency dividing ratio can be selected. the count source of prescaler is the instruction clock (instck). use the bit 2 of register w1 to select the prescaler dividing ratio and the bit 3 to start and stop its operation. when the bit 3 of register w1 is cleared to 0, prescaler is initialized, and the output signal (orclk) stops. (4) timer 1 (interrupt function) timer 1 is an 8-bit binary down counter with the timer 1 reload register (r1). when timer 1 stops, data can be set simultaneously in timer 1 and the reload register (r1) with the t1ab instruction. when timer 1 is operating, data can be set only in the reload register (r1) with the t1ab instruction. when setting the next count data to reload register r1 while timer 1 is operating, be sure to set data before timer 1 underflows. timer 1 starts counting after the following process; set data in timer 1, select the count source with bits 0 and 1 of register w1, a set the bit 0 of register w2 to 1. once count is started, when timer 1 underflows (the next count pulse is input after the contents of timer 1 becomes 0), the timer 1 interrupt request flag (t1f) is set to 1, new data is loaded from reload register r1, and count continues (auto- reload function). when a value set in reload register r1 is n, timer 1 divides the count source signal by n + 1 (n = 0 to 255). data can be read from timer 1 to registers a and b. stop counting and then execute the tab1 instruction to read its data. (5) timer 2 (interrupt function) timer 2 is a 14-bit binary down counter. timer 2 starts counting after the following process; select the count source with the bit 3 of register w2, and the clock as a count source is supplied. timer 2 stops counting and its count value is retained when supply of a clock as a count source stops. timer 2 is initialized at reset and when the count source changes from f(x cin ) (w2 3 =0) to orclk (w2 3 =1). the count value to set the timer 2 interrupt request flag (t2f) to 1 can be selected from every 8192 count or every 16384 count with bits 1 and 2 of register w2. the count source signal divided by 16 is output from timer 2. timer 2 can be used as a counter for clock in the clock operating mode (pof instruction executed). (6) timer lc timer lc is a 4-bit binary down counter with the timer lc reload register (rlc). data can be set simultaneously in timer lc and the reload register (rlc) with the tlca instruction. timer lc starts counting after the following process; set data in timer lc, select the count source with the bit 1 of register w3, a set the bit 0 of register w3 to 1. timer lc is the timer for lcd clock generating. also, it can be used as the multi-carrier generator by setting the bit 1 of register w3 to 1 and selecting the system clock (stck) as a count source. when the multi-carrier generator is selected, the waveform which is the timer lc underflow signal divided by 2 can be output as a carrier wave from port carr. at this time, stop the carrier generating circuit and lcd control circuit. when the multi-carrier generator (duty ratio: 1/2 fixed) is used, the enable/stop of the carrier wave output from port carr can be set by the stop of timer lc or the carrier wave output auto-control function by timer 1. (7) timer interrupt request flags (t1f and t2f) each timer interrupt request flag is set to 1 when each timer underflows. the state of these flags can be examined with the skip instructions (snzt1 and snzt2). use the interrupt control register v1 to select an interrupt or a skip instruction. an interrupt request flag is cleared to 0 when an interrupt occurs or when the next instruction is skipped with a skip instruction.
22 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter watchdog timer watchdog timer provides a method to reset the system when a program runs wild. watchdog timer consists of timer 2, watchdog timer enable flag (wef), and watchdog timer flag (wdf). when the wrst instruction is executed after system is released from reset, the wef flag is set to 1. at this time, the watchdog timer starts operating. when the wef flag is set to 1, it cannot be cleared to 0 until system reset is performed. also, when the wrst instruction is not executed once, watchdog timer does not operate because the wef flag retains 0. when the watchdog timer is operating, the wdf flag is set to 1 every time the bit 12 of timer 2 is cleared from 1 to 0. this means that count is performed 8192 times. when the bit 12 of timer 2 is cleared from 1 to 0 while the wdf flag is set to 1, the internal reset signal is generated and system reset is performed. the wdf flag can be cleared to 0 with the wrst instruction. in the ram back-up mode, through timer 2 count operation stops, its count value is retained and the wdf flag is initialized. in the clock operating mode, timer 2 count operation is continued and the wdf flag is initialized. when using the watchdog timer, execute the wrst instruction at a certain cycle which consists of timer 2s 8191 counts or less to keep the microcomputer operation normal. fig. 20 watchdog timer function fig. 21 program example to enter the ram back-up mode when using the watchdog timer the contents of the wdf flag are initialized in the ram back-up mode. if the wdf flag is set to 1 at the same time that the microcomputer enters the ram back-up mode, system reset may be performed. when using the watchdog timer and the ram back-up mode, initialize the wdf flag with the wrst instruction just before the microcomputer enters the ram back-up mode (refer to figure 21). pof2 epof ; pof instruction execution enabled (ram back-up mode) oscillation stop wrst ; clear wdf flag 1fff 16 value of timer 2 internal reset signal wrst instruction execution system reset wrst instruction execution wef flag 3fff 16 0000 16 wdf flag ? ? ? ? ? ?
23 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter carrier generating circuit the 4551 group has a carrier generating circuit that generates the transfer waveform by dividing the system clock (stck) for each remote control carrier wave. each carrier waveform can be output by setting the carrier wave selection register (c1). also, timer 1 can auto-control the carrier wave output from port carr by setting the carrier wave output control register (c2). fig. 22 carrier wave selection register duty frequency carrier wave register c1 setting value no carrier wave ??fixed c1 0 c1 1 c1 2 1/4 1/2 1/2 1/3 1/2 output waveform stck/24 stck/16 stcr instruction spcr instruction c1 3 stck/12 stck/8 stck 1/4 1/2 1/2 1/3 1/2 (at reset: 0 1 1 1 2 , at power down: 0 1 1 1 2 , w) carrier wave selection register c1 stck/2 no available ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0000 0001 0010 0011 0100 0101 0111 1000 1001 1010 1011 1100 1101 0110 1110 1111 ? ? note:??represents write enabled.
24 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter table 11 carrier generating circuit control register and control flag c2 0 auto-control output by timer 1 is invalid auto-control output by timer 1 is valid carrier wave output auto-control bit 0 1 at reset : 0 2 carrier wave output control register c2 at power down : 0 2 w cr carrier wave generating stop (spcr instruction) carrier wave generating start (stcr instruction) carrier wave generating control 0 1 at reset : 0 2 carrier wave generating control flag cr at power down : 0 2 w note: w represents write enabled. (1) carrier generating circuit related registers l carrier wave selection register c1 each carrier waveform can be selected by setting the register c1. set the contents of this register through register a with the tc1a instruction. l carrier wave output control register c2 timer 1 can auto-control the output enable interval and the output disable interval of the carrier wave output from port carr by setting the register c2. set the contents of this register through register a with the tc2a instruction. the setting of the output enable/disable interval is described below. validate the carrier wave output auto-control function (c2 0 =1). select the carrier wave or the carrier wave divided by 2 as the timer 1 count source. a set the count value (the output enable interval of carrier wave from port carr) to timer 1. ? operate timer 1 (w2 0 =1). ? operate the carrier generating circuit (stcr instruction executed). ? set the next count value (the output disable interval of carrier wave from port carr) to reload register r1 before timer 1 underflow occurs. the carrier wave is output from port carr until the first timer 1 underflow occurs. the output of the carrier wave from port carr is disabled and the next count value is loaded from reload register r1 to timer 1 by the first timer 1 underflow. then, the output of carrier wave is disabled until the second timer 1 underflow. also, the next enable interval of the carrier wave output can be set by setting the third count value to timer 1 reload register before the second timer 1 underflow occurs. if the carrier wave output auto-control function is invalidated (c2 0 =0) while the carrier wave output is auto- controlled, the output of port carr retains the state when the auto-control is invalidated regardless of timer 1 underflow. this state can be terminated by timer 1 stop (w2 0 =0). when the carrier wave output auto-control function is validated (c2 0 =1) again after it is invalidated (c2 0 =0), the auto- control of carrier wave output is started again when the next timer 1 underflow occurs. (2) carrier wave generating control flag (cr) the cr flag is used to control the carrier wave generating operation of the carrier generating circuit. the cr flag is 1 and the carrier wave generating is started by executing the stcr instruction. the cr flag is 0 and the carrier wave generating is stopped by executing the spcr instruction. the cr flag is 0 at system reset. (3) note on the carrier generating circuit stop in order to stop the carrier wave which has the cycle longer than that of the instruction clock with the spcr instruction, stop it at the point when the carrier wave outputs l level in the spcr instruction execution cycle. if this condition is not satisfied, the last h output interval of carrier wave is shortened. (4) notes when using the carrier wave output auto-control function l execute the stcr instruction after setting the timer 1 and register c2 in order to start the carrier generating circuit operation. l stop the timer 1 (w2 0 =0) after stopping the carrier generating circuit (spcr instruction executed) while the carrier wave output is disabled in order to stop the carrier wave output auto-control operation. l if the carrier wave output auto-control function is invalidated (c2 0 =0) while the carrier wave output is auto-controlled, the output of port carr retains the state when the auto- control is invalidated regardless of timer 1 underflow. this state can be terminated by timer 1 stop (w2 0 =0). when the carrier wave output auto-control function is validated (c2 0 =1) again after it is invalidated (c2 0 =0), the auto-control of carrier wave output is started again when the next timer 1 underflow occurs. however, when the carrier wave output auto-control bit is changed during timer 1 underflow, the error-operation may occur. l use the carrier wave or the carrier wave divided by 2 as the timer 1 count source when the carrier wave output auto- control function is selected. if the orclk is used as the count source, a hazard may occur in port carr output because orclk is not synchronized with the carrier wave.
25 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 23 carrier wave output auto-control by timer 1 timer 1 underflow port carr output s (c2 0 ) ? 0 register c2 0 s (c2 0 ) ? 1 s (c2 0 ) ? 0 s (c2 0 ) ? 1 a b c s set the interval a to timer 1. s set the interval b to reload register r1. s set the interval c to reload register r1. s set the interval d to reload register r1. d timer 1 underflow port carr output (c2 0 ) ? 1 carrier wave output start timer 1 start s carrier wave output start h l 1 0 1 0 h l 1 0
26 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter lcd function the 4551 group has an lcd (liquid crystal display) controller/ driver. when proper voltage is applied to the lcd power supply input pins and data are set in timer control registers (w2, w3), timer lc, lcd control registers (l1, l2), and lcd ram, the lcd controller/driver automatically reads the display data and controls the lcd display by setting duty and bias. 4 common signal output pins and 20 segment signal output pins can be used to drive the lcd. by using these pins, up to 80 segments (when 1/4 duty and 1/3 bias are selected) can be controlled to display. when the required number of segment pins is 19 or less, pins seg 16 Cseg 19 (4) can be used as input ports p2 0 Cp2 3 . (1) duty and bias there are 3 combinations of duty and bias for displaying data on the lcd. use bits 0 and 1 of lcd control register (l1) to select the proper display method for the lcd panel being used. l 1/2 duty, 1/2 bias l 1/3 duty, 1/3 bias l 1/4 duty, 1/3 bias table 12 duty and maximum number of displayed pixels (2) lcd clock control the lcd clock is determined by the timer 2 count source selection bit (w2 3 ), timer lc control bit (w3 0 ), and timer lc. accordingly, the frequency (f) of the lcd clock is obtained by the following formula. numbers ( to ? ) shown below the formula correspond to numbers in figure 24, respectively. l when using the prescaler output (orclk) as timer 2 count source (w2 3 =1) f = orclk 5 55 l when using the f(x cin ) as timer 2 count source (w2 3 =0) f = f(x cin ) 5 55 [lc: 0 to 15] the frame frequency and frame period for each display method can be obtained by the following formula: frame frequency = (hz) frame period = (s) f: lcd clock frequency 1/n: duty fig. 24 lcd clock control circuit structure duty 1/2 1/3 1/4 used com pins com 0 , com 1 (note) com 0 Ccom 2 (note) com 0 Ccom 3 maximum number of displayed pixels 40 segments 60 segments 80 segments note: leave unused com pins open. 1 16 1 lc + 1 1 2 a ? ? 1 16 1 lc + 1 1 2 a ? ? f n n f note: count source is stopped by clearing to 0. a ? ? timer lc 1/2 1/16 w3 0 0 1 (note) x cin w2 3 0 1 orclk stck w3 1 1 0 lcd clock
27 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 25 lcd controller/driver structure common driver com 0 com 1 com 2 com 3 bias control multiplexer v lc3 control signal seg 0 p2 0 /seg 16 p2 3 /seg 19 multiplexer selector segment driver selector segment driver seg 15 ram ram decoder 1/2, 1/3, 1/4 counter l1 3 l1 2 l1 1 l1 0 lcd on/off control lcd clock (from timer block) selector segment driver ram l2 3 l2 2 l2 1 l2 0 register a ................. ................. ... (note) C C note: v lc3 =v dd . ... ...
28 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter (3) lcd ram ram contains areas corresponding to the liquid crystal display. when 1 is written to this lcd ram, the display pixel corresponding to the bit is automatically displayed. (4) lcd drive waveform when 1 is written to a bit in the lcd ram data, the voltage difference between common pin and segment pin which correspond to the bit automatically becomes lv lc3 l and the display pixel at the cross section turns on. when returning from reset, and in the ram back-up mode, a display pixel turns off because every segment output pin and common output pin becomes v lc3 level (=v dd ). fig. 26 lcd ram map table 13 lcd control registers not used lcd on/off bit lcd duty and bias selection bits lcd control register l1 l1 3 l1 2 l1 1 l1 0 at reset : 0000 2 at power down : state retained 0 1 0 1 r/w this bit has no function, but read/write is enabled off on not available l1 1 0 0 1 1 l1 0 0 1 0 1 duty 1/2 1/3 1/4 bias 1/2 1/3 1/3 lcd control register l2 at reset : 1111 2 at power down : state retained w 0 1 0 1 0 1 0 1 seg 19 p2 3 seg 18 p2 2 seg 17 p2 1 seg 16 p2 0 l2 3 l2 2 l2 1 l2 0 p2 3 /seg 19 pin function switch bit p2 2 /seg 18 pin function switch bit p2 1 /seg 17 pin function switch bit p2 0 /seg 16 pin function switch bit note: r represents read enabled, and w represents write enabled. z x y bit 8 9 10 11 12 13 14 15 com 1 01 2 3 210 3 210 3 210 seg 1 seg 2 seg 3 seg 4 seg 5 seg 6 seg 7 com 3 seg 1 seg 2 seg 3 seg 4 seg 5 seg 6 seg 7 com 2 seg 1 seg 2 seg 3 seg 4 seg 5 seg 6 seg 7 com 1 seg 1 seg 2 seg 3 seg 4 seg 5 seg 6 seg 7 com 0 seg 9 seg 10 seg 11 seg 12 seg 13 seg 14 seg 15 com 3 com 2 com 1 com 0 com 3 com 2 com 1 com 0 seg 9 seg 10 seg 11 seg 12 seg 13 seg 14 seg 15 seg 9 seg 10 seg 11 seg 12 seg 13 seg 14 seg 15 seg 0 seg 0 seg 0 seg 0 seg 8 seg 17 seg 18 seg 19 seg 16 seg 8 seg 8 seg 8 seg 9 seg 10 seg 11 seg 12 seg 13 seg 14 seg 15 seg 17 seg 18 seg 19 seg 16 seg 17 seg 18 seg 19 seg 16 seg 17 seg 18 seg 19 seg 16 note: the area marked ? ?is not the lcd display ram.
29 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 27 lcd controller/driver structure 1/2 duty, 1/2 bias: when writing (xx10) 2 to address m (1, 2, 8) in ram. com 1 com 0 seg 16 v lc 3 v lc 1 =v lc 2 v ss v lc 3 v lc 1 =v lc 2 v ss 1 frame (2/f) 1/f on off voltage level (bit 0) com 0 com 1 seg 16 0 1 x x (bit 3) m (1, 2, 8) com 1 seg 16 com 0 seg 16 1/3 duty, 1/3 bias: when writing (x101) 2 to address m (1, 2, 8) in ram. 1 frame (3/f) 1/f on off on com 2 v lc 3 v lc 2 v lc 1 v ss com 1 com 0 seg 16 v lc 3 v lc 2 v lc 1 v ss voltage level (bit 0) com 0 com 1 com 2 seg 16 1 0 1 x (bit 3) m (1, 2, 8) com 2 seg 16 com 1 seg 16 com 0 seg 16 1/4 duty, 1/3 bias: when writing (1010) 2 to address m (1, 2, 8) in ram. 1 frame (4/f) 1/f on off on com 3 com 2 com 1 com 0 seg 16 v lc 3 v lc 2 v lc 1 v ss v lc 3 v lc 2 v lc 1 v ss off voltage level (bit 0) com 0 com 1 com 2 com 3 seg 16 0 1 0 1 (bit 3) m (1, 2, 8) com 3 seg 16 com 2 seg 16 com 1 seg 16 com 0 seg 16 f: lcd clock frequency x: set an arbitrary value. (these bits are not related to set the drive waveform at each duty.)
30 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter note: keep the value of supply voltage the minimum value or more of the recommended operating conditions. reset software start (address 0 in page 0) reset input 1machine cycle or more = 0.3v dd f(x in ) is counted 10757 to 10786 times (note) 0.85v dd reset function ____________ system reset is performed by applying l level to reset pin for 1 machine cycle or more when the following condition is satisfied; ? the value of supply voltage is the minimum value or more of the recommended operating conditions. ____________ then when h level is applied to reset pin, software starts from address 0 in page 0. v dd power-on reset circuit output voltage internal reset signal power-on reset pin wef watchdog timer output internal reset signal reset state reset released this symbol represents a parasitic diode. note: applied potential to reset pin must be v dd or less. (note) power-on reset circuit pull-up transistor voltage drop detection circuit f(x in ) reset f(x in ) is counted 10757 to 10786 times software start (address 0 in page 0) note: the number of clock cycles depends on the internal state of the microcomputer when reset is performed. (note) ? ? fig. 28 reset release timing fig. 29 reset pin input waveform and reset operation (1) power-on reset reset can be automatically performed at power on (power- on reset) by the built-in power-on reset circuit. when the built- in power-on reset circuit is used, the time for the supply voltage to reach the minimum operating voltage must be set to 100 m s or less. if the rising time exceeds 100 m s, connect a capacitor between the reset pin and v ss at the shortest distance, and input l level to reset pin until the value of supply voltage reaches the minimum operating voltage. fig. 30 power-on reset circuit example
31 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter ? program counter (pc) ............................................................................................ address 0 in page 0 is set to program counter. ? interrupt enable flag (inte) ................................................................................... ? power down flag (p) .............................................................................................. ? external 0 interrupt request flag (exf0) ............................................................... ? interrupt control register v1 ................................................................................... ? interrupt control register i1 .................................................................................... ? timer 1 interrupt request flag (t1f) ...................................................................... ? timer 2 interrupt request flag (t2f) ...................................................................... ? watchdog timer flag (wdf) ................................................................................... ? watchdog timer enable flag (wef) ....................................................................... ? timer control register w1 ...................................................................................... ? timer control register w2 ...................................................................................... ? timer control register w3 ...................................................................................... ? clock control register mr ...................................................................................... ? carrier wave selection register c1 ........................................................................ ? carrier wave output control register c2 ................................................................ ? carrier wave generating control flag cr ............................................................... ? lcd control register l1 .......................................................................................... ? lcd control register l2 .......................................................................................... ? pull-up control register pu0 .................................................................................. ? general-purpose register v2 ................................................................................. ? carry flag (cy) ....................................................................................................... ? register a .............................................................................................................. ? register b .............................................................................................................. ? register d .............................................................................................................. ? register e .............................................................................................................. ? data pointer x ........................................................................................................ ? data pointer y ........................................................................................................ ? data pointer z ........................................................................................................ ? stack pointer (sp) .................................................................................................. (2) internal state at reset table 14 shows port state at reset, and figure 31 shows internal state at reset (they are retained after system is released from reset). name d 0 Cd 4 , d 5 /int d 6 /x cin , d 7 /x cout p0 0 Cp0 3 p1 0 Cp1 3 p2 0 /seg 16 Cp2 3 /seg 19 seg 0 Cseg 15 com 0 Ccom 3 carr state high impedance (note 1) h (v dd ) level (note 1) (notes 1, 2) high impedance v lc3 (v dd ) level l (v ss ) level function d 0 Cd 4 , d 5 d 6 , d 7 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 Cp2 3 seg 0 Cseg 15 com 0 Ccom 3 carr notes 1: output latch is set to 1. 2: the pull-up transistor is turned off. table 14 port state at reset the contents of timers, registers, flags and ram except those shown in figure 31 are undefined, so set the initial values to them. 00000000000000 0 (interrupt disabled) 0 0 0 0 0 0 (interrupt disabled) 0000 0 0 0 0 0 0 0 0 (prescaler stopped) 0 0 0 0 (timer 1 stopped) 0 0 (timer lc stopped) 1000 0111 0 0 (carrier wave output disabled) 0 0 0 0 (lcd off) 1 1 1 1 (port p2 selected) 0000 0000 0 0000 0000 555 0000 0000 55 111 5 represents undefined. fig. 31 internal state at reset 55555555
32 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter voltage drop detection circuit the built-in voltage drop detection circuit is designed to detect a drop in voltage and to reset the microcomputer if the supply voltage drops below a set value. fig. 32 voltage drop detection reset circuit fig. 33 voltage drop detection circuit operation waveform reset pin wef watchdog timer output internal reset signal power-on reset circuit pull-up transistor voltage drop detection circuit internal reset signal v dd detection voltage the microcomputer starts operation after the f(x in ) is counted 10757 to 10786 times. voltage drop detection circuit operating voltage drop detection circuit stop voltage drop detection circuit operating voltage drop detection circuit stop voltage drop detection circuit operating ? ?
33 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter power down function the 4551 group has 2-type power down functions. l clock operating mode .................................. pof instruction l ram back-up mode .................................... pof2 instruction power down is performed by executing each instruction. above power down functions are different from reset in start conditions. table 15 shows the function and states retained at power down. figure 36 shows the state transition. l return from power down state ............. warm start condition l return from reset state .......................... cold start condition (1) clock operating mode the following functions and states are retained. l ram l reset circuit l x cin Cx cout oscillation l lcd display l timer 2 (2) ram back-up mode the following functions and states are retained. l ram l reset circuit unlike the clock operating mode, all oscillations stop in the ram back-up mode. (3) warm start condition the system returns from the power down state when; l the external wakeup signal is input or the timer 2 underflow occurs in the clock operating mode, or when; l the external wakeup signal is input in the ram back-up mode. in either case, the cpu starts executing the software from address 0 in page 0. in this case, the p flag is 1. (4) cold start condition the cpu starts executing the software from address 0 in page 0 when; l reset pulse is input to reset pin, or l reset by watchdog timer is performed. in this case, the p flag is 0. table 15 functions and states retained at power down power down ram back-up 5 o o o 5 o 5 o 5 (note 3) o (note 4) 5 o 5 5 o 5 o 5 5 clock operating 5 o o o 5 o 5 o 5 o o o 5 o 5 5 o o o 5 5 function program counter (pc), registers a, b, carry flag (cy), stack pointer (sp) (note 2) contents of ram port level clock control register mr timer control register w1 timer control registers w2, w3 interrupt control register v1 interrupt control register i1 carrier wave control registers and flag (c1, c2, cr) lcd display function lcd control registers l1, l2 timer lc timer 1 function timer 2 function external 0 interrupt request flag (exf0) timer 1 interrupt request flag (t1f) timer 2 interrupt request flag (t2f) watchdog timer flag (wdf) watchdog timer enable flag (wef) interrupt enable flag (inte) general-purpose register v2 notes 1: o represents that the function can be retained, and 5 represents that the function is initialized. registers and flags other than the above are undefined at power down, and set an initial value after returning. 2: the stack pointer (sp) points the level of the stack register and is initialized to 111 2 at power down. 3: lcd is turned off. 4: the state of the timer is undefined.
34 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter (5) identification of the start condition warm start or cold start can be identified by examining the state of the power down flag (p) with the snzp instruction. the warm start condition (timer 2 or external wakeup signal) can be identified by examining the state of t2f flag. fig. 34 set source and clear source of the p flag l set source pof or pof2 instruction executed l clear source reset input s r q powerdown flag p pof instruction or pof2 instruction reset input software start p = 1 t2f = 1 ? ? no yes yes return by external wakeup signal return by timer 2 underflow cold start no fig. 35 start condition identified example using the snzp instruction (6) return signal an external wakeup signal or timer 2 interrupt request flag is used to return from the clock operating mode. an external wakeup signal is used to return from the ram back-up mode because the oscillation is stopped. table 16 shows the return condition for each return source. (7) port p1 control register l pull-up control register pu0 register pu0 controls the on/off of the port p1 pull-up transistor and the on/off of the key-on wakeup function. set the contents of this register through register a with the tpu0a instruction. in addition, the tapu0 instruction can be used to transfer the contents of register pu0 to register a. table 16 return source and return condition remarks port p0 shares the falling edge detection circuit with port p1. the key-on wakeup function of port p0 is always valid. the only key-on wakeup function of the port p1 bit of which the pull-up transistor is turned on is valid. set all the port using the key-on wakeup function to h level before going into the power down state. the timer 2 interrupt request flag (t2f) can be used only when system returns from the clock operating mode (pof instruction execution). however, if the pof and pof2 instructions are executed while the t2f = 1, its operation is recognized as the return condition and system returns from the clock operating mode. return condition returns by an external falling edge input (h ? l). returns by timer 2 underflow and setting t2f to 1. return source ports p0, p1 timer 2 interrupt request flag external wakeup signal note: p1 pin has the pull-up transistor which can be turned on/off by software. table 17 pull-up control register pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup port p1 3 pull-up transistor control bit port p1 2 pull-up transistor control bit port p1 1 pull-up transistor control bit port p1 0 pull-up transistor control bit 0 1 0 1 0 1 0 1 at reset : 0000 2 at power down : state retained pull-up control register pu0 r/w pu0 3 pu0 2 pu0 1 pu0 0 note: r represents read enabled, and w represents write enabled.
35 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter (8) state transition state transition is described using figure 36. fig. 36 state transition mr 0 ? 0 b mr 0 ? 1 c mr 1 ? 1 mr 1 ? 0 d k a mr 2 ? 1 mr 0 ? 0 f mr 0 ? 1 g mr 1 ? 1 mr 1 ? 0 h mr 2 ? 0 e mr 2 ? 1 mr 3 ? 1 mr 3 ? 0 mr 3 ? 1 mr 3 ? 0 mr 3 ? 1 mr 3 ? 0 mr 3 ? 1 mr 3 ? 0 (note 2) (note 2) (stabilizing time c ) (stabilizing time c ) j f(x in ):stop f(x cin ) : oscillation i (stabilizing time c ) (stabilizing time c ) (stabilizing time d ) (stabilizing time d ) b , f c , g d , h b , f c , g d , h a , e a , e b , f c , g d , h b , f c , g d , h a , e (note 2) reset pof execution return input 1 (stabilizing time a ) pof execution return input 1, 2 (stabilizing time a ) pof execution return input 1, 2 (stabilizing time c ) (note 1) clock operating mode pof execution return input 1, 2 (stabilizing time c ) (note 1) f(x in ):stop f(x cin ):stop clock operating mode f(x in ):oscillation f(x cin ):stop system clock; f(x in )/4 mr=(1000 2 ) mr 2 ? 0 f(x in ):oscillation f(x cin ):oscillation f(x in ):oscillation f(x cin ):oscillation f(x in ):stop f(x cin ):oscillation system clock; f(x in )/4 mr=(1100 2 ) system clock; f(x cin )/4 mr=(1101 2 ) system clock; f(x cin )/4 mr=(1111 2 ) f(x in ):oscillation f(x cin ):stop system clock; f(x in ) mr=(0000 2 ) f(x in ):oscillation f(x cin ):oscillation system clock; f(x in ) mr=(0100 2 ) f(x in ):oscillation f(x cin ):oscillation system clock; f(x cin ) mr=(0101 2 ) f(x in ):stop f(x cin ):oscillation system clock; f(x cin ) mr=(0111 2 ) (stabilizing time d ) (stabilizing time d ) (note 2) pof2 execution return input 1 (stabilizing time a ) pof2 execution return input 1 (stabilizing time a ) pof2 execution return input 1 (stabilizing time b ) pof2 execution return input 1 (stabilizing time b ) f(x in ):stop f(x cin ):stop ram back-up mode stabilizing time a : an interval required to stabilize the f(x in ) oscillation is automatically generated by hardware. stabilizing time b : an interval required to stabilize the f(x cin ) oscillation is automatically generated by hardware. stabilizing time c : generate an interval required to stabilize the f(x in ) oscillation in state c or g by software at the transition d ? c, d ? g, h ? c, h ? g, j ? c, or j ? g. stabilizing time d : generate an interval required to stabilize the f(x cin ) oscillation in state b, f by software at the transition a ? b, e ? f, a ? f, or e ? b. return input 1: external wakeup signal (p0 0 Cp0 3 , p1 0 Cp1 3 ) return input 2: timer 2 interrupt request flag notes 1. mr 3 =1 ? the microcomputer starts its operation after counting f(x cin ) clock signal 59 to 70 times. mr 3 =0 ? the microcomputer starts its operation after counting f(x cin ) clock signal 32 to 43 times. 2. when the following 2 conditions are satisfied, the transition a ? e, b ? f, a ? f, c ? f, g ? f represented by can be executed. (1) v dd = 2.2 v to 5.5 v (one time prom version: v dd = 2.5 v to 5.5 v), f(x in ) 1.0 mhz (2) v dd = 4.5 v to 5.5 v, f(x in ) 2.0 mhz a , e mr 2 ? 0 mr 3 ? 0 mr 2 ? 1 mr 3 ? 1 (note 2) mr 2 ? 1 mr 2 ? 0 mr 3 ? 0 mr 3 ? 1 mr 3 ? 1 mr 0 ? 0 mr 3 ? 0 mr 0 ? 1 mr 0 ? 1 mr 0 ? 0 mr 3 ? 1 mr 3 ? 0 mr 3 ? 1 mr 1 ? 0 mr 3 ? 0 mr 1 ? 1 mr 1 ? 0 mr 3 ? 0 mr 1 ? 1 mr 3 ? 1
36 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter clock control the clock control circuit consists of the following circuits. l clock generating circuit l control circuit to stop the clock oscillation l system clock (stck) selection circuit l instruction clock (instck) generating circuit l control circuit to return from the power down state fig. 37 clock control circuit structure (1) clock control register l clock control register mr register mr controls the system clock. set the contents of this register through register a with the tmra osc x in x out osc x cin x cout internal clock generating circuit (divided by 3) mr0 r s q r s q pof instruction pof2 instruction mr1 t2f flag falling detected ports p0, p1 reset multiplexer frequency dividing circuit (divided by 4) mr3 0 1 stck instck instruction. in addition, the tamr instruction can be used to transfer the contents of register mr to register a. table 18 clock control register system clock (stck) selection bit f(x cin ) oscillation circuit control bit f(x in ) oscillation circuit control bit clock selection bit at reset : 1000 2 at power down : state retained clock control register mr r/w mr 3 mr 2 mr 1 mr 0 mr 0 =0 f(x in ) mr 0 =1 f(x cin ) mr 0 =0 f(x in )/4 mr 0 =1 f(x cin )/4 f(x cin ) oscillation stop, ports d 6 and d 7 selected f(x cin ) oscillation enabled, ports d 6 and d 7 not selected oscillation enabled oscillation stop f(x in ) f(x cin ) 0 1 0 1 0 1 0 1 note: r represents read enabled, and w represents write enabled.
37 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 38 ceramic resonator external circuit (2) f(x in ) clock generating circuit clock signal f(x in ) is obtained by externally connecting a ceramic resonator. connect this external circuit to pins x in and x out at the shortest distance. a feedback resistor is built in between pins x in and x out . (3) f(x cin ) clock generating circuit clock signal f(x cin ) is obtained by externally connecting a quartz-crystal oscillator. connect this external circuit to pins x cin and x cout at the shortest distance. a feedback resistor is built in between pins x cin and x cout . rom ordering method please submit the information described below when ordering mask rom. (1) M34551M4-XXXFP mask rom order confirmation form ..............................................................................................1 (2) data to be written into mask rom ......................... eprom (three sets containing the identical data) (3) mark specification form ..................................................... 1 m34551 x in x out rd c in c out externally connect a damping resistor rd depending on the oscillation frequency. (a feedback resistor is built-in.) use the resonator manufacturer? recommended value because constants such as capacitance depend on the resonator. note: fig. 39 quartz-crystal oscillator external circuit m34551 x cin x cout rd c in c out externally connect a damping resistor rd depending on the oscillation frequency. (a feedback resistor is built-in.) use the quartz-crystal oscillator manufacturer? recommended value because constants such as capacitance depend on the quartz-crystal oscillator. note:
38 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter list of precautions noise and latch-up prevention connect a capacitor on the following condition to prevent noise and latch-up; ? connect a bypass capacitor (approx. 0.1 m f) between pins v dd and v ss at the shortest distance, ? equalize its wiring in width and length, and ? use the thickest wire. in the built-in prom version, cnv ss pin is also used as v pp pin. accordingly, when using this pin, connect this pin to v ss through a resistor about 5 k w (connect this resistor to cnv ss / v pp pin as close as possible). prescaler stop the prescaler operation to change its frequency dividing ratio. a count source stop timer 1 or timer lc counting to change its count source. when timer 2 count source changes from f(x cin ) to orclk (w2 3 = 0 ? w2 3 = 1), the count value of timer 2 is initialized. however, when timer 2 count source changes from orclk to f(x cin ) (w2 3 = 1 ? w2 3 = 0) or the same count source is set again (w2 3 = 0 ? w2 3 = 0 or w2 3 = 1 ? w2 3 = 1), the count value of timer 2 is not initialized. ? timer 2 timer 2 has the watchdog timer function (wdt). when timer 2 is used as the wdt, note that the processing to initialize the count value and the execution of the wrst instruction. ? reading the count value stop the prescaler and then execute the tab1 instruction to read timer 1 data. ? writing to reload register r1 write the data to reload register r1 while timer 1 is operating, avoid a timing when timer 1 underflows. ? notes when using the carrier wave output auto-control function ? execute the stcr instruction after setting the timer 1 and register c2 in order to start the carrier generating circuit operation. ? stop the timer 1 (w2 0 =0) after stopping the carrier generating circuit (spcr instruction executed) while the carrier wave output is disabled in order to stop the carrier wave output auto-control operation. ? if the carrier wave output auto-control function is invalidated (c2 0 =0) while the carrier wave output is auto-controlled, the output of port carr retains the state when the auto- control is invalidated regardless of timer 1 underflow. this state is released by timer 1 stop (w2 0 =0). when the carrier wave output auto-control function is validated (c2 0 =1) again after it is invalidated (c2 0 =0), the auto-control of carrier wave output is started again when the next timer 1 underflow occurs. however, when the carrier wave output auto-control bit is changed during timer 1 underflow, the error-operation may occur. ? use the carrier wave or the carrier wave divided by 2 as the timer 1 count source when the carrier wave output auto- control function is selected. if the orclk is used as the count source, a hazard may occur in port carr output because orclk is not synchronized with the carrier wave. ? d 5 /int pin when the interrupt valid waveform of d 5 /int pin is changed with the bit 2 of register i1 in software, be careful about the following notes. ? clear the bit 0 of register v1 to 0 and then change the interrupt valid waveform of d 5 /int pin with the bit 2 of register i1 (refer to figure 40 ). ? clear the bit 2 of register i1 to 0 and execute the snz0 instruction to clear the exf0 flag after executing at least one instruction (refer to figure 40 ). depending on the input state of the d 5 /int pin, the external 0 interrupt request flag (exf0) may be set to 1 when the interrupt valid waveform is changed. la 4 ; ( 555 0 2 ) tv1a ; the snz0 instruction is valid la 4 ti1a ; change of the interrupt valid waveform nop snz0 ;the snz0 instruction is executed nop 5 : this bit is not related to the setting of int. . . . . . . one time prom version the operating power voltage of the one time prom version is within the range of 2.5 v to 5.5 v. multifunction note that the port d 5 output function can be used even when int function is selected. power down instruction (pof instruction, pof2 instruction) execute the pof or pof2 instruction immediately after executing the epof instruction to enter the power down state. note that system cannot enter the power down state when executing only the pof or pof2 instruction. program counter make sure that the pc h does not specify after the last page of the built-in rom. fig. 40 external 0 interrupt program example 12 11
mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter function (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) + 1 (m(dp)) ? (a) (x) ? (x)exor(j) j = 0 to 15 (a) ? n n = 0 to 15 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (b) ? (rom(pc)) 7 to 4 (a) ? (rom(pc)) 3 to 0 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (a) ? (a) + (m(dp)) (a) ? (a) + (m(dp)) + (cy) (cy) ? carry (a) ? (a) + n n = 0 to 15 (a) ? (a)and(m(dp)) (a) ? (a)or(m(dp)) (cy) ? 1 (cy) ? 0 (cy) = 0 ? (a) ? (a) ? cy ? a 3 a 2 a 1 a 0 list of instruction function grouping grouping mnemonic xami j tma j la n tabp p am amc a n and or sc rc szc cma rar mnemonic tab tba tay tya teab tabe tda tad taz tax tasp lxy x, y lz z iny dey tam j xam j xamd j function (a) ? (b) (b) ? (a) (a) ? (y) (y) ? (a) (e 7 Ce 4 ) ? (b) (e 3 Ce 0 ) ? (a) (b) ? (e 7 Ce 4 ) (a) ? (e 3 Ce 0 ) (dr 2 Cdr 0 ) ? (a 2 Ca 0 ) (a 2 Ca 0 ) ? (dr 2 Cdr 0 ) (a 3 ) ? 0 (a 1 , a 0 ) ? (z 1 , z 0 ) (a 3 , a 2 ) ? 0 (a) ? (x) (a 2 Ca 0 ) ? (sp 2 Csp 0 ) (a 3 ) ? 0 (x) ? x, x = 0 to 15 (y) ? y, y = 0 to 15 (z) ? z, z = 0 to 3 (y) ? (y) + 1 (y) ? (y) C 1 (a) ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) C 1 register to register transfer ram addresses ram to register transfer arithmetic operation ram to register transfer bit operation function (mj(dp)) ? 1 j = 0 to 3 (mj(dp)) ? 0 j = 0 to 3 (mj(dp)) = 0 ? j = 0 to 3 (a) = (m(dp)) ? (a) = n ? n = 0 to 15 (pc l ) ? a 6 Ca 0 (pc h ) ? p (pc l ) ? a 6 Ca 0 (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? 2 (pc l ) ? a 6 Ca 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? a 6 Ca 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 mnemonic sb j rb j szb j seam sea n b a bl p, a bla p bm a bml p, a bmla p rti rt rts grouping comparison operation branch operation subroutine operation return operation 39
mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter list of instruction function (continued) interrupt operation function (tlc) ? (a) (rlc) ? (a) (t1f) = 1 ? after skipping the next instruction, (t1f) ? 0 (t2f) = 1 ? after skipping the next instruction, (t2f) ? 0 (a) ? (p0) (p0) ? (a) (a) ? (p1) (p1) ? (a) (a) ? (p2) (d) ? 1 (d(y)) ? 0 (y) = 0 to 9 (d(y)) ? 1 (y) = 0 to 9 (pu0) ? (a) (a) ? (pu0) (l1) ? (a) (a) ? (l1) (l2) ? (a) mnemonic tlca snzt1 snzt2 iap0 op0a iap1 op1a iap2 cld rd sd tpu0a tapu0 tl1a tal1 tl2a timer operation timer operation input/output operation lcd control operation function (c1) ? (a) carrier wave generating start carrier wave generating stop (c2 0 ) ? (a 0 ) (pc) ? (pc) + 1 transition to clock operating mode transition to ram back-up mode power down instruction (pof, pof2) valid (p) = 1 ? ( wdf ) ? 0, ( wef ) ? 1 (a) ? (mr) (mr) ? (a) (a) ? (v2) (v2) ? (a) grouping mnemonic tc1a stcr spcr tc2a nop pof pof2 epof snzp wrst tamr tmra tav2 tv2a carrier wave generating operation other operation function (inte) ? 0 (inte) ? 1 (exf0) = 1 ? after skipping the next instruction, (exf0) ? 0 i1 2 = 1 : (int0) = h ? i1 2 = 0 : (int0) = l ? (a) ? (v1) (v1) ? (a) (a) ? (i1) (i1) ? (a) (a) ? (w1) (w1) ? (a) (a) ? (w2) (w2) ? (a) (a 1 , a 0 ) ? (w3 1 , w3 0 ) (w3 1 , w3 0 ) ? (a 1 , a 0 ) (b) ? (t1 7 Ct1 4 ) (a) ? (t1 3 Ct1 0 ) at timer 1 stop ( w2 0 =0) (r1 7 Cr1 4 ) ? (b) (t1 7 Ct1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (t1 3 Ct1 0 ) ? (a) at timer 1 operating (w2 0 =1), (r1 7 Cr1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) mnemonic di ei snz0 snzi0 tav1 tv1a tai1 ti1a taw1 tw1a taw2 tw2a taw3 tw3a tab1 t1ab grouping grouping 40
mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter instruction code table hex. notation d 9 Cd 4 000000 d 3 C d 0 000001 000010 000011 000100000101000110 000111001000 001001001010001011 001100 001101001110 001111 010000 010111 011000 011111 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 a b c d e f nop C pof snzp di ei rc sc C am amc tya C tba C 00 bla cld C iny rd sd C dey and or teab C cma rar tab tay 01 szb 0 sean seam C C tda tabe C C C C szc 02 bmla C C C C C C C snz0 C C tv1a 03 C C C C rt rts rti C 04 tasp tad tax taz tav1 C C C C C epof lz 0 lz 1 lz 2 lz 3 rb 0 rb 1 rb 2 rb 3 sb 0 sb 1 sb 2 sb 3 05 06 07 08 09 0a a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 la 0 la 1 la 2 la 3 la 4 la 5 la 6 la 7 la 8 la 9 la 10 la 11 la 12 la 13 la 14 la 15 tabp 0 tabp 1 tabp 2 tabp 3 tabp 4 tabp 5 tabp 6 tabp 7 tabp 8 tabp 9 tabp 10 tabp 11 tabp 12 tabp 13 tabp 14 tabp 15 0b bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml 0c 0d bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl 0e 0f bm bm bm bm bm bm bm bm bm bm bm bm bm bm bm bm 10C17 b b b b b b b b b b b b b b b b 18C1f szb 1 szb 2 szb 3 the above table shows the relationship between machine language codes and machine language instructions. d 3 Cd 0 show the low-order 4 bits of the machine language code, and d 9 Cd 4 show the high-order 6 bits of the machine language code. the hexadecimal representation of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each instruction is shown. do not use code marked C. the codes for the second word of a two-word instruction are described below. * cannot be used at m34551m4. bl bml bla bmla sea szd the second word 1 0 p a a a a a a a 1 0 p a a a a a a a 1 0 p p 0 0 p p p p 1 0 p p 0 0 p p p p 0 0 0 1 1 1 n n n n 0 0 0 0 1 0 1 0 1 1 snzi0 tv2a tav2 C C tabp 16 tabp 17 tabp 18 tabp 19 tabp 20 tabp 21 tabp 22 tabp 23 tabp 24 tabp 25 tabp 26 tabp 27 tabp 28 tabp 29 tabp 30 tabp 31 pof2 C tabp 32* tabp 48* tabp 33* tabp 49* tabp 34* tabp 50* tabp 35* tabp 51* tabp 36* tabp 52* tabp 37* tabp 53* tabp 38* tabp 54* tabp 39* tabp 55* tabp 40* tabp 56* tabp 41* tabp 57* tabp 42* tabp 58* tabp 43* tabp 59* tabp 44* tabp 60* tabp 45* tabp 61* tabp 46* tabp 62* tabp 47* tabp 63* bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl 41
mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter instruction code table (continued) hex. notation d 9 Cd 4 100000 d 3 C d 0 100001100010 100011100100 100101100110 100111101000 101001101010 101011101100 101101101110 101111 110000 111111 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 a b c d e f C C C C tw1a tw2a 20 ti1a 21 op0a 22 23 24 tai1 taw1 taw2 25 26 27 28 29 2a iap0 iap1 snzt2 tma 1 tma 2 tma 3 tma 4 tma 5 tma 6 tma 7 tma 8 tma 9 tma 10 tma 11 tma 12 tma 13 tma 14 tma 15 2b tam 1 tam 2 tam 3 tam 4 tam 5 tam 6 tam 7 tam 8 tam 9 tam 10 tam 11 tam 12 tam 13 tam 14 tam 15 2c xam 1 xam 2 xam 3 xam 4 xam 5 xam 6 xam 7 xam 8 xam 9 xam 10 xam 11 xam 12 xam 13 xam 14 xam 15 2d xami 1 xami 2 xami 3 xami 4 xami 5 xami 6 xami 7 xami 8 xami 9 xami 10 xami 11 xami 12 xami 13 xami 14 xami 15 2e 2f lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy 30C3f op1a snzt1 wrst tma 0 tam 0 xam 0 xami 0 xamd 1 xamd 2 xamd 3 xamd 4 xamd 5 xamd 6 xamd 7 xamd 8 xamd 9 xamd 10 xamd 11 xamd 12 xamd 13 xamd 14 xamd 15 xamd 0 iap2 the above table shows the relationship between machine language codes and machine language instructions. d 3 Cd 0 show the low-order 4 bits of the machine language code, and d 9 Cd 4 show the high-order 6 bits of the machine language code. the hexadecimal representation of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each instruction is shown. do not use code marked C. the codes for the second word of a two-word instruction are described below. bl bml bla bmla sea szd the second word 1 0 p a a a a a a a 1 0 p a a a a a a a 1 0 p p 0 0 p p p p 1 0 p p 0 0 p p p p 0 0 0 1 1 1 n n n n 0 0 0 0 1 0 1 0 1 1 tpu0a t1ab tab1 C C C C tmra tamr tapu0 C C C tw3a tl1a tl2a tal1 tlca taw3 stcr tc1a spcr tc2a C C C C C C C C C C C C C C CC C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C CC C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C CC C 42
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter register to register transfer ram addresses machine instructions tab tba tay tya teab tabe tda tad taz tax tasp lxy x, y lz z iny dey 0000011110 0000001110 0000011111 0000001100 0000011010 0000101010 0000101001 0001010001 0001010011 0001010010 0001010000 11x 3 x 2 x 1 x 0 y 3 y 2 y 1 y 0 00010010z 1 z 0 0000010011 0000010111 (a) ? (b) (b) ? (a) (a) ? (y) (y) ? (a) (e 7 Ce 4 ) ? (b) (e 3 Ce 0 ) ? (a) (b) ? (e 7 Ce 4 ) (a) ? (e 3 Ce 0 ) (dr 2 Cdr 0 ) ? (a 2 Ca 0 ) (a 2 Ca 0 ) ? (dr 2 Cdr 0 ) (a 3 ) ? 0 (a 1 , a 0 ) ? (z 1 , z 0 ) (a 3 , a 2 ) ? 0 (a) ? (x) (a 2 Ca 0 ) ? (sp 2 Csp 0 ) (a 3 ) ? 0 (x) ? x, x = 0 to 15 (y) ? y, y = 0 to 15 (z) ? z, z = 0 to 3 (y) ? (y) + 1 (y) ? (y) C 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 01e 00e 01f 00c 01a 02a 029 051 053 052 050 3xy 048 +z 013 017 43
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C C C C C C C C C C C C C C C C C C C C C C C C C continuous description C (y) = 0 (y) = 15 transfers the contents of register b to register a. transfers the contents of register a to register b. transfers the contents of register y to register a. transfers the contents of register a to register y. transfers the contents of registers a and b to register e. transfers the contents of register e to registers a and b. transfers the contents of register a to register d. transfers the contents of register d to register a. transfers the contents of register z to register a. transfers the contents of register x to register a. transfers the contents of stack pointer (sp) to register a. loads the value x in the immediate field to register x, and the value y in the immediate field to register y. when the lxy instructions are continuously coded and executed, only the first lxy instruction is executed and other lxy instructions coded continuously are skipped. loads the value z in the immediate field to register z. adds 1 to the contents of register y. as a result of addition, when the contents of register y is 0, the next instruction is skipped. subtracts 1 from the contents of register y. as a result of subtraction, when the contents of register y is 15, the next instruction is skipped. 44
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter ram to register transfer arithmetic operation tam j xam j xamd j xami j tma j la n tabp p (a) ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) C 1 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) + 1 (m(dp)) ? (a) (x) ? (x)exor(j) j = 0 to 15 (a) ? n n = 0 to 15 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (b) ? (rom(pc)) 7 to 4 (a) ? (rom(pc)) 3 to 0 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (note) 1 1 1 1 1 1 3 1 1 1 1 1 1 1 2c j 2d j 2f j 2e j 2b j 07 n 08 p +p 101100 jjjj 101101 jjjj 101111 jjjj 101110 jjjj 101011 jjjj 000111nnnn 0010p 5 p 4 p 3 p 2 p 1 p 0 note: p is 0 to 31 for m34551m4 and p is 0 to 63 for m34551e8. machine instructions (continued) 45
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C (y) = 15 (y) = 0 C continuous description C C C C C C C C after transferring the contents of m(dp) to register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. subtracts 1 from the contents of register y. as a result of subtraction, when the contents of register y is 15, the next instruction is skipped. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. adds 1 to the contents of register y. as a result of addition, when the contents of register y is 0, the next instruction is skipped. after transferring the contents of register a to m(dp), an exclusive or operation is performed between register x and the value j in the immediate field, and stores the result in register x. loads the value n in the immediate field to register a. when the la instructions are continuously coded and executed, only the first la instruction is executed and other la instructions coded continuously are skipped. transfers bits 7 to 4 to register b and bits 3 to 0 to register a. these bits 7 to 0 are the rom pattern in address (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) 2 specified by registers a and d in page p. when this instruction is executed, 1 stage of stack register is used. 46
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter arithmetic operation bit operation comparison operation am amc a n and or sc rc szc cma rar sb j rb j szb j seam sea n 0000001010 0000001011 000110nnnn 0000011000 0000011001 0000000111 0000000110 0000101111 0000011100 0000011101 00010111j j 00010011j j 00001000j j 0000100110 0000100101 000111nnnn 00a 00b 06n 018 019 007 006 02f 01c 01d 05 c +j 04 c +j 02 j 02 6 02 5 07 n 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 (a) ? (a) + (m(dp)) (a) ? (a) + (m(dp))+ (cy) (cy) ? carry (a) ? (a) + n n = 0 to 15 (a) ? (a)and(m(dp)) (a) ? (a)or(m(dp)) (cy) ? 1 (cy) ? 0 (cy) = 0 ? (a) ? (a) ? cy ? a 3 a 2 a 1 a 0 (mj(dp)) ? 1 j = 0 to 3 (mj(dp)) ? 0 j = 0 to 3 (mj(dp)) = 0 ? j = 0 to 3 (a) = (m(dp)) ? (a) = n ? n = 0 to 15 machine instructions (continued) 47
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C overflow = 0 C C C C (cy) = 0 C C C C (mj(dp)) = 0 j = 0 to 3 (a) = (m(dp)) (a) = n C 0/1 C C C 1 0 C C 0/1 C C C C C adds the contents of m(dp) to register a. stores the result in register a. the contents of carry flag cy remains unchanged. adds the contents of m(dp) and carry flag cy to register a. stores the result in register a and carry flag cy. adds the value n in the immediate field to register a. the contents of carry flag cy remains unchanged. skips the next instruction when there is no overflow as the result of operation. performs the and operation between the contents of register a and the contents of m(dp), and stores the result in register a. performs the or operation between the contents of register a and the contents of m(dp), and stores the result in register a. sets carry flag cy to 1. clears carry flag cy to 0. skips the next instruction when the contents of carry flag cy is 0. stores the ones complement for register as contents in register a. rotates the contents of register a including the contents of carry flag cy to the right by 1 bit. sets the contents of bit j (bit specified by the value j in the immediate field) of m(dp) to 1. clears the contents of bit j (bit specified by the value j in the immediate field) of m(dp) to 0. skips the next instruction when the contents of bit j (bit specified by the value j in the immediate field) of m(dp) is 0. skips the next instruction when the contents of register a is equal to the contents of m(dp). skips the next instruction when the contents of register a is equal to the value n in the immediate field. 48
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter branch operation subroutine operation return operation b a bl p, a bla p bm a bml p, a bmla p rti rt rts 011a 6 a 5 a 4 a 3 a 2 a 1 a 0 00111p 4 p 3 p 2 p 1 p 0 10p 5 a 6 a 5 a 4 a 3 a 2 a 1 a 0 0000010000 10p 5 p 4 00p 3 p 2 p 1 p 0 010a 6 a 5 a 4 a 3 a 2 a 1 a 0 00110p 4 p 3 p 2 p 1 p 0 10p 5 a 6 a 5 a 4 a 3 a 2 a 1 a 0 0000110000 10p 5 p 4 00p 3 p 2 p 1 p 0 0001000110 0001000100 0001000101 18 a +a 0e p +p 2p a +a 01 0 2p p 1a a 0c p +p 2pa +a 03 0 2p p 04 6 04 4 04 5 1 2 2 1 2 2 1 1 1 1 2 2 1 2 2 1 2 2 (pc l ) ? a 6 Ca 0 (pc h ) ? p (pc l ) ? a 6 Ca 0 (note) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (note) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? 2 (pc l ) ? a 6 Ca 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? a 6 Ca 0 (note) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (note) (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 note: p is 0 to 31 for m34551m4 and p is 0 to 63 for m34551e8. machine instructions (continued) 49
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C C C C C C C skip unconditionally C C C C C C C C C branch within a page : branches to address a in the identical page. branch out of a page : branches to address a in page p. branch out of a page : branches to address (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) 2 specified by registers d and a in page p. call the subroutine in page 2 : calls the subroutine at address a in page 2. call the subroutine : calls the subroutine at address a in page p. call the subroutine : calls the subroutine at address (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) 2 specified by registers d and a in page p. returns from interrupt service routine to main routine. returns each value of data pointer (x, y, z), carry flag, skip status, nop mode status by the continuous description of the la/lxy instruction, register a and register b to the states just before interrupt. returns from subroutine to the routine called the subroutine. returns from subroutine to the routine called the subroutine, and skips the next instruction unconditionally. 50
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter interrupt operation machine instructions (continued) di ei snz0 snzi0 tav1 tv1a tai1 ti1a snzt1 snzt2 taw1 tw1a taw2 tw2a taw3 tw3a 0000000100 0000000101 0000111000 0000111010 0001010100 0000111111 1001010011 1000010111 1010000000 1010000001 1001001011 1000001110 1001001100 1000001111 1001001101 1000010000 00 4 00 5 03 8 03 a 054 03f 253 217 280 281 24b 20e 24c 20f 24d 210 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (inte) ? 0 (inte) ? 1 (exf0) = 1 ? after skipping the next instruction, (exf0) ? 0 i1 2 = 1 : (int) = h ? i1 2 = 0 : (int) = l ? (a) ? (v1) (v1) ? (a) (a) ? (i1) (i1) ? (a) (t1f) = 1 ? after skipping the next instruction (t1f) ? 0 (t2f) = 1 ? after skipping the next instruction (t2f) ? 0 (a) ? (w1) (w1) ? (a) (a) ? (w2) (w2) ? (a) (a 1 , a 0 ) ? (w3 1 , w3 0 ) (w3 1 , w3 0 ) ? (a 1 , a 0 ) timer operation 51
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C (exf0) = 1 (int) = h however, i1 2 = 1 (int) = l however, i1 2 = 0 C C C C (t1f) = 1 (t2f) =1 C C C C C C C C C C C C C C C C C C C C C C C clears the interrupt enable flag inte to 0, and disables the interrupt. sets the interrupt enable flag inte to 1, and enables the interrupt. skips the next instruction when the contents of exf0 flag is 1. after skipping, clears the exf0 flag to 0. when bit 2 (i1 2 ) of register i1 is 1 : skips the next instruction when the level of int pin is h. when bit 2 (i1 2 ) of register i1 is 0 : skips the next instruction when the level of int pin is l. transfers the contents of interrupt control register v1 to register a. transfers the contents of register a to interrupt control register v1. transfers the contents of interrupt control register i1 to register a. transfers the contents of register a to interrupt control register i1. skips the next instruction when the contents of t1f flag is 1. after skipping, clears t1f flag. skips the next instruction when the contents of t2f flag is 1. after skipping, clears t2f flag. transfers the contents of timer control register w1 to register a. transfers the contents of register a to timer control register w1. transfers the contents of timer control register w2 to register a. transfers the contents of register a to timer control register w2. transfers the contents of timer control register w3 to register a. transfers the contents of register a to timer control register w3. 52
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter tab1 t1ab tlca iap0 op0a iap1 op1a iap2 cld rd sd tpu0a tapu0 timer operation 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1001110000 1000110000 1000001101 1001100000 1000100000 1001100001 1000100001 1001100010 0000010001 0000010100 0000010101 1000101101 1001010111 270 230 20d 260 220 261 221 262 011 014 015 22d 257 (b) ? (t1 7 Ct1 4 ) (a) ? (t1 3 Ct1 0 ) at timer 1 stop (w2 0 =0), (r1 7 Cr1 4 ) ? (b) (t1 7 Ct1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (t1 3 Ct1 0 ) ? (a) at timer 1 operating (w2 0 =1), (r1 7 Cr1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (tlc) ? (a) (rlc) ? (a) (a) ? (p0) (p0) ? (a) (a) ? (p1) (p1) ? (a) (a) ? (p2) (d) ? 1 (d(y)) ? 0 (y) = 0 to 9 (d(y)) ? 1 (y) = 0 to 9 (pu0) ? (a) (a) ? (pu0) machine instructions (continued) input/output operation 53
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C C C C C C C C C C C C C C C C C C C C C C C C C transfers the contents of timer 1 to registers a and b. when stopping (w2 0 =0), transfers the contents of registers a and b to timer 1 and timer 1 reload register. when operating (w2 0 =1), transfers the contents of registers a and b only to timer 1 reload register. transfers the contents of register a to timer lc and timer lc reload register. transfers the input of port p0 to register a. outputs the contents of register a to port p0. transfers the input of port p1 to register a. outputs the contents of register a to port p1. transfers the input of port p2 to register a. sets port d to 1. clears a bit of port d specified by register y to 0. sets a bit of port d specified by register y to 1. transfers the contents of register a to pull-up control register pu0. transfers the contents of pull-up control register pu0 to register a. 54
function mnemonic d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation type of instructions parameter number of words number of cycles instruction code mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter tl1a tal1 tl2a tc1a stcr spcr tc2a nop pof pof2 epof snzp wrst tamr tmra tav2 tv2a 1000001010 1001001010 1000001011 1010101000 1010011000 1010011001 1010101001 0000000000 0000000010 0000001000 0001011011 0000000011 1010100000 1001010010 1000010110 0001010101 0000111110 20a 24a 20b 2a8 298 299 2a9 000 002 008 05b 003 2a0 252 216 055 03e 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (l1) ? (a) (a) ? (l1) (l2) ? (a) (c1) ? (a) carrier wave generating start carrier wave generating stop (c2 0 ) ? (a 0 ) (pc) ? (pc) + 1 transition to clock operating mode transition to ram back-up mode power down instruction (pof, pof2) valid (p) = 1 ? (wdf) ? 0, (wef) ? 1 (a) ? (mr) (mr) ? (a) (a) ? (v2) (v2) ? (a) machine instructions (continued) lcd control operation other operation carrier generating circuit operation 55
skip condition detailed description carry flag cy mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter C C C C C C C C C C C (p) = 1 C C C C C C C C C C C C C C C C C C C C C C transfers the contents of register a to lcd control register l1. transfers the contents of register l1 to register a. transfers the contents of register a to lcd control register l2. transfers the contents of register a to carrier wave selection register c1. starts generating carrier wave. stops generating carrier wave. transfers the contents of register a to carrier wave output control register c2. no operation puts the system in clock operating mode state by executing the pof instruction after executing the epof instruction. f(x cin ) oscillation, lcd, timer lc and timer 2 are operated. puts the system in ram back-up mode state by executing the pof2 instruction after executing the epof instruction. oscillation is stopped. validates the power down instruction (pof, pof2) which is executed after the epof instruction by executing the epof instruction. skips the next instruction when p flag is 1. after skipping, p flag remains unchanged. operates the watchdog timer and initializes the watchdog timer flag (wdf). transfers the contents of clock control register mr to register a. transfers the contents of register a to clock control register mr. transfers the contents of general-purpose register v2 to register a. transfers the contents of register a to general-purpose register v2. 56
57 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter symbol the symbols shown below are used in the following list of instruction function and machine instructions. symbol a b dr e v1 v2 i1 w1 w2 w3 c1 c2 cr l1 l2 pu0 mr x y z dp pc pc h pc l sk sp cy r1 r2 rlc stck instk t1 t2 tlc t1f t2f contents register a (4 bits) register b (4 bits) register d (3 bits) register e (8 bits) interrupt control register v1 (4 bits) general-purpose register v2 (4 bits) interrupt control register i1 (4 bits) timer control register w1 (4 bits) timer control register w2 (4 bits) timer control register w3 (2 bits) carrier wave selection register c1 (4 bits) carrier wave output control register c2 (1 bit) carrier wave generating control flag lcd control regiser l1 lcd control register l2 pull-up control register pu0 (4 bits) clock control register mr (4 bits) register x (4 bits) register y (4 bits) register z (2 bits) data pointer (10 bits) (it consists of registers x, y, and z) program counter (14 bits) high-order 7 bits of program counter low-order 7 bits of program counter stack register (14 bits 5 8) stack pointer (3 bits) carry flag timer 1 reload register timer 2 reload register timer lc reload register system clock instruction clock timer 1 timer 2 timer lc timer 1 interrupt request flag timer 2 interrupt request flag contents watchdog timer flag interrupt enable flag external 0 interrupt request flag power down flag port d (8 bits) port p0 (4 bits) port p1 (4 bits) port p2 (4 bits) hexadecimal variable hexadecimal variable hexadecimal variable hexadecimal variable hexadecimal constant which represents the immediate value hexadecimal constant which represents the immediate value hexadecimal constant which represents the immediate value binary notation of hexadecimal variable a (same for others) direction of data movement data exchange between a register and memory decision of state shown before ? contents of registers and memories negate, flag unchanged after executing instruction ram address pointed by the data pointer label indicating address a 6 a 5 a 4 a 3 a 2 a 1 a 0 label indicating address a 6 a 5 a 4 a 3 a 2 a 1 a 0 in page p 5 p 4 p 3 p 2 p 1 p 0 hex. c + hex. number x (also same for others) symbol wdf inte exf0 p d p0 p1 p2 x y z p n i j a 3 a 2 a 1 a 0 ? ? ? ( ) m(dp) a p, a c + x note : the 4551 group just invalidates the next instruction when a skip is performed. the contents of program counter is not increased by 2. accordingly, the number of cycles does not change even if skip is not performed. however, the cycle count becomes 1 if the tabp p, rt, or rts instruction is skipped.
58 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter control registers v1 3 v1 2 v1 1 v1 0 timer 2 interrupt enable bit timer 1 interrupt enable bit not used external 0 interrupt enable bit 0 1 0 1 0 1 0 1 interrupt disabled (snzt2 instruction is valid) interrupt enabled (snzt2 instruction is invalid) interrupt disabled (snzt1 instruction is valid) interrupt enabled (snzt1 instruction is invalid) this bit has no function, but read/write is enabled. interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) interrupt control register v1 at reset : 0000 2 at power down : 0000 2 r/w prescaler control bit prescaler dividing ratio selection bit timer 1 count source selection bits timer control register w1 w1 3 w1 2 w1 1 w1 0 at reset : 0000 2 at power down : 0000 2 0 1 0 1 r/w stop (prescaler state initialized) operating instruction clock (instck) divided by 4 instruction clock (instck) divided by 8 count source prescaler output (orclk) carrier output (carry) carrier output divided by 2 (carry/2) w1 1 0 0 1 1 w1 0 0 1 0 1 timer control register w2 at reset : 1000 2 at power down : C C C 0 2 r/w 0 1 f(x cin ) prescaler output (orclk) w2 3 w2 2 w2 1 w2 0 timer 2 count source selection bit timer 2 count value selection bits timer 1 control bit w2 2 0 0 1 1 w2 1 0 1 0 1 count source underflow occur every 2 14 count underflow occur every 2 13 count not available not available stop (timer 1 state retained) operating 0 1 timer control register w3 at reset : 00 2 at power down : state retained r/w 0 1 0 1 bit 3 of timer 2 is output (timer 2 count source divided by 16) state clock (stck) stop (timer lc state retained) operating w3 1 w3 0 timer lc count source selection bit timer lc control bit note: r represents read enabled, and w represents write enabled. C represents state retained.
59 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter control registers (continued) i1 3 i1 2 i1 1 i1 0 not used interrupt valid waveform for int pin selection bit (note 2) not used not used 0 1 0 1 0 1 0 1 this bit has no function, but read/write is enabled. falling waveform (l level of int pin is recognized with the snzi0 instruction) rising waveform (h level of int pin is recognized with the snzi0 instruction) this bit has no function, but read/write is enabled. this bit has no function, but read/write is enabled. interrupt control register i1 r/w at reset : 0000 2 at power down : state retained pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup pull-up transistor off, no key-on wakeup pull-up transistor on, key-on wakeup port p1 3 pull-up transistor control bit port p1 2 pull-up transistor control bit port p1 1 pull-up transistor control bit port p1 0 pull-up transistor control bit 0 1 0 1 0 1 0 1 at reset : 0000 2 at power down : state retained pull-up control register pu0 r/w pu0 3 pu0 2 pu0 1 pu0 0 system clock (stck) selection bit f(x cin ) oscillation circuit control bit f(x in ) oscillation circuit control bit clock selection bit at reset : 1000 2 at power down : state retained clock control register mr r/w mr 3 mr 2 mr 1 mr 0 mr 0 =0 f(x in ) mr 0 =1 f(x cin ) mr 0 =0 f(x in )/4 mr 0 =1 f(x cin )/4 f(x cin ) oscillation stop, ports d 6 and d 7 selected f(x cin ) oscillation enabled, ports d 6 and d 7 not selected oscillation enabled oscillation stop f(x in ) f(x cin ) 0 1 0 1 0 1 0 1 notes 1: r represents read enabled, and w represents write enabled. 2: depending on the input state of d 5 /int pin, the external interrupt request flag exf0 may be set to 1 when the contents of i1 2 is changed. accordingly, set a value to bit 2 of register i1 and execute the snz0 instruction to clear the exf0 flag after executing at least one instruction.
60 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter c1 3 c1 2 c1 1 c1 0 00 00 00 01 00 10 00 11 01 00 01 01 01 10 01 11 10 00 10 01 10 10 10 11 11 00 11 01 11 10 11 11 control registers (continued) at reset : 0111 2 at power down : 0111 2 carrier wave selection register c1 w carrier wave frequency stck/24 stck/24 stck/16 stck/16 stck/2 no carrier wave not available l fixed stck/12 stck/12 stck/8 stck/8 stck no carrier wave not available l fixed duty 1/3 1/2 1/4 1/2 1/2 1/3 1/2 1/4 1/2 1/2 carrier wave selection bits c2 0 auto-control output by timer 1 is invalid auto-control output by timer 1 is valid carrier wave output auto-control bit 0 1 at reset : 0 2 carrier wave output control register c2 at power down : 0 2 w cr carrier wave generating stop (spcr instruction) carrier wave generating start (stcr instruction) carrier wave generating control 0 1 at reset : 0 2 carrier wave generating control flag cr at power down : 0 2 w note: w represents write enabled.
61 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter control registers (continued) not used lcd on/off bit lcd duty and bias selection bits lcd control register l1 l1 3 l1 2 l1 1 l1 0 at reset : 0000 2 at power down : state retained 0 1 0 1 r/w this bit has no function, but read/write is enabled off on not available l1 1 0 0 1 1 l1 0 0 1 0 1 duty 1/2 1/3 1/4 bias 1/2 1/3 1/3 lcd control register l2 at reset : 1111 2 at power down : state retained w 0 1 0 1 0 1 0 1 seg 19 p2 3 seg 18 p2 2 seg 17 p2 1 seg 16 p2 0 l2 3 l2 2 l2 1 l2 0 p2 3 /seg 19 pin function switch bit p2 2 /seg 18 pin function switch bit p2 1 /seg 17 pin function switch bit p2 0 /seg 16 pin function switch bit 4-bit general-purpose register. the data transfer between register a and this register is performed with the tv2a and tav2 instructions. at reset : 0000 2 general-purpose register v2 at power down : 0000 2 r/w note: r represents read enabled, and w represents write enabled.
62 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter min. 2.2 2.5 4.5 2.0 0.8v dd 0.7v dd 0.85v dd 0.8v dd 0 0 0 0 C30 C15 C15 C7 32 absolute maximum ratings parameter supply voltage input voltage p0, p1, p2, reset , x in , x cin output voltage p0, p1, d output voltage carr, x out , x cout output voltage seg, com power dissipation operating temperature range storage temperature range conditions output transistors in cut-off state symbol v dd v i v o v o v o pd topr tstg ratings C0.3 to 7.0 C0.3 to v dd +0.3 C0.3 to v dd +0.3 C0.3 to v dd +0.3 C0.3 to v dd +0.3 300 C20 to 70 C40 to 125 unit v v v v v mw c c recommended operating conditions (mask rom version:ta = C20 c to 70 c, v dd = 2.2 v to 5.5 v, unless otherwise noted) (one time prom version:ta = C20 c to 70 c, v dd = 2.5 v to 5.5 v, unless otherwise noted) parameter supply voltage ram back-up voltage supply voltage h level input voltage p0, p1, p2 h level input voltage x in h level input voltage reset h level input voltage int l level input voltage p0, p1, p2 l level input voltage x in l level input voltage reset l level input voltage int l level peak output current p0, p1, d 0 Cd 7 , carr l level average output current p0, p1, d 0 Cd 7 , carr (note) h level peak output current carr h level average output current carr (note) f(x cin ) clock frequency valid power supply rising time for power-on reset circuit limits symbol v dd v ram v ss v ih v ih v ih v ih v il v il v il v il i ol (peak) i ol (avg) i oh (peak) i oh (avg) f(x cin ) t pon max. 5.5 5.5 5.5 5.5 v dd v dd v dd v dd 0.3v dd 0.3v dd 0.3v dd 0.2v dd 10 4 5 2 50 100 typ. 0 unit v v v v v v v v v v v ma ma ma ma khz m s conditions f(x in ) 4.0 mhz, ceramic resonator, stck=f(x in )/4 f(x in ) 1.0 mhz, ceramic resonator, stck=f(x in ) f(x in ) 4.0 mhz, ceramic resonator, stck=f(x in )/4 f(x in ) 1.0 mhz, ceramic resonator, stck=f(x in ) f(x in ) 8.0 mhz, ceramic resonator, stck=f(x in )/4 f(x in ) 2.0 mhz, ceramic resonator, stck=f(x in ) ram back-up v dd =5.0 v v dd =3.0 v v dd =5.0 v v dd =3.0 v v dd =5.0 v v dd =3.0 v v dd =5.0 v v dd =3.0 v quarts-crystal oscillator mask rom version v dd = 0 to 2.2 v one time prom version v dd = 0 to 2.5 v mask rom version one time prom version note: the average output current is the average current value at the 100 ms interval.
63 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter unit v v m a m a m a ma m a m a m a k w k w v v k w k w k w max. 0.9 0.9 1 1 5.0 65 20 1.0 10 125 250 70 130 6.5 8 9 11 1200 electrical characteristics (mask rom version:ta = C20 c to 70 c, v dd = 2.2 v to 5.5 v, unless otherwise noted) (one time prom version:ta = C20 c to 70 c, v dd = 2.5 v to 5.5 v, unless otherwise noted) limits symbol v ol v oh i ih i il i oz i dd r ph v t+ C v tC r com r seg r vlc parameter l level output voltage p0, p1, d 0 Cd 7 , carr, reset h level output voltage carr h level input current p0, p1, p2, reset l level input current p1, p2 output current at off-state d 0 Cd 7 supply current (note 2) pull-up resistor value hysteresis com output impedance seg output impedance lcd power supply internal resistor value (note 3) test conditions i ol = 5 ma i ol = 2 ma i oh = C15 ma i oh = C7 ma v i = v dd (note 1) v i = 0 v (note 1) v o = v dd v dd = 5.0 v, f(x cin ) = 32 khz, f(x in ) = 8 mhz stck = f(x in )/4 v dd = 5.0 v f(x cin ) = 32 khz stck = f(x in ) v dd = 3.0 v, f(x cin ) = 32 khz, f(x in ) = 4 mhz stck = f(x in )/4 v dd = 3.0 v f(x cin ) = 32 khz stck = f(x in ) v dd = 5.0 v f(x in ) = stop f(x cin ) = 32 khz v dd = 3.0 v f(x in ) = stop f(x cin ) = 32 khz f(x in ) = stop f(x cin ) = 32 khz ta=25 c f(x in ) = stop f(x cin ) = 32 khz f(x in ) = stop, f(x cin ) = stop, ta = 25 c f(x in ) = stop, f(x cin ) = stop v dd = 5.0 v, v i = 0 v v dd = 3.0 v, v i = 0 v v dd = 5.0 v, v i = 0 v v dd = 3.0 v, v i = 0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v impedance between v lc3 and v ss ta=25 c typ. 2.5 0.1 50 100 30 60 0.5 0.4 1.5 0.6 1.3 1.6 1.8 2.2 600 v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v at active high-speed mode while lcd is operating at active low-speed mode while lcd is operating at clock operating mode while lcd is operating at ram back-up mode p0, p1 reset int reset f(x in ) = 2 mhz f(x in ) = 1 mhz f(x in ) = 1 mhz f(x in ) = 500 khz stck = f(x cin )/4 stck = f(x cin ) stck = f(x cin )/4 stck = f(x cin ) v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v min. 2.4 1.0 C1 20 40 12 25 300 2.3 1.4 0.7 0.6 0.4 60 75 25 30 27.5 10 notes 1: in this case, the pull-up transistor of port p1 is turned off and the port p2 function is selected by software. 2: the current value includes the current dissipation of the lcd power supply internal resistor (r vlc ). 3: v lc3 =v dd . 4.6 2.8 1.4 1.2 0.8 140 180 60 80 60 17.5
64 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter basic timing diagram system clock port d output ports p0, p1 output ports p0, p1 and p2 input interrupt input stck parameter pin name machine cycle mi mi+1 int d 0 d 7 p0 0 p0 3 p1 0 p1 3 p0 0 p0 3 p1 0 p1 3 p2 0 p2 3
65 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter product m34551e8-xxxfp m34551e8fp prom size ( 5 10 bits) 8192 words ram size ( 5 4 bits) 280 words package 48p6s-a rom type one time prom [shipped after writing] (shipped after writing and test in factory) one time prom [shipped in blank] pin configuration (top view) built-in prom version in addition to the mask rom version, the 4551 group has the programmable rom version software compatible with mask rom. the one time prom version has prom which can only be written to and not be erased. the built-in prom version has functions similar to those of the mask rom version, but it has a prom mode that enables writing to built-in prom. table 20 shows the product of built-in prom version. figure 41 shows the pin configurations of built-in prom version. the one time prom version has pin-compatibility with the mask rom version. table 20 product of built-in prom version 123 4567891011121314 38 37 36 35 34 33 32 31 30 29 28 27 26 25 15 16 17 18 19 20 21 22 23 24 48 47 46 45 44 43 42 41 40 39 seg 2 seg 3 seg 4 seg 5 seg 6 seg 7 seg 8 com 2 com 3 seg 0 seg 1 m34551e8-xxxfp seg 11 seg 14 seg 15 seg 9 v ss x out x in p1 0 p1 1 p1 2 p1 3 d 1 d 2 d 3 d 4 p0 0 p0 1 p0 2 p0 3 d 0 reset d 7 /x cout d 6 /x cin carr v dd cnv ss v ss d 5 / int com 1 com 0 seg 10 seg 13 seg 12 p2 3 / seg 19 p2 2 / seg 18 p2 0 / seg 16 p2 1 / seg 17 outline 48p6s-a fig. 41 pin configuration of built-in prom version 65
66 mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter fig. 42 prom memory map fig. 43 flow of writing and test of the product shipped in blank (1) prom mode the built-in prom version has a prom mode in addition to a normal operation mode. the prom mode is used to write to and read from the built-in prom. in the prom mode, the programming adapter can be used with a general-purpose prom programmer to write to or read from the built-in prom as if it were m5m27c256k. programming adapter is listed in table 21. contact addresses at the end of this book for the appropriate prom programmer. ? writing and reading of built-in prom programming voltage is 12.5 v. write the program in the prom of the built-in prom version as shown in figure 42. (2) notes on handling a high-voltage is used for writing. take care that overvoltage is not applied. take care especially at turning on the power. for the one time prom version shipped in blank, mitsubishi electric corp. does not perform prom writing test and screening in the assembly process and following processes. in order to improve reliability after writing, performing writing and test according to the flow shown in figure 43 before using is recommended. (products shipped in blank: prom contents is not written in factory when shipped) table 21 programming adapter microcomputer m34551e8-xxxfp, m34551e8fp programming adapter pca7414 writing with prom programmer screening (leave at 150 c for 40 hours) (note) verify test with prom programmer function test in target device since the screening temperature is higher than storage temperature, never expose the microcomputer to 150c exceeding 100 hours. note: address 0000 16 1fff 16 4000 16 5fff 16 7fff 16 1 11 d 4 d 3 d 2 d 1 d 0 high-order 5 bits 1 11 d 4 d 3 d 2 d 1 d 0 low-order 5 bits set ff 16 to the shaded area.
? 1997 mitsubishi electric corp. ki-9711 printed in japan (rod) ii new publication, effective nov. 1997. specifications subject to change without notice. notes regarding these materials ? these materials are intended as a reference to assist our customers in the selection of the mitsubishi semiconductor product best suited to the customers application; they do not convey any license under any intellectual property rights, or any other rights, belonging to mitsubishi electric corporation or a third party. ? mitsubishi electric corporation assumes no responsibility for any damage, or infringement of any third-partys rights, originating in the use of any product data, diagrams, charts or circuit application examples contained in these materials. ? all information contained in these materials, including product data, diagrams and charts, represent information on products at the time of publication of these materials, and are subject to change by mitsubishi electric corporation without notice due to product improvements or other reasons. it is therefore recommended that customers contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for the latest product information before purchasing a product listed herein. ? mitsubishi electric corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. ? the prior written approval of mitsubishi electric corporation is necessary to reprint or reproduce in whole or in part these materials. ? if these products or technologies are subject to the japanese export control restrictions, they must be exported under a license from the japanese government and cannot be imported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/or the country of destination is prohibited. ? please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for further details on these materials or the products contained therein. keep safety first in your circuit designs! ? mitsubishi electric corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any malfunction or mishap. mitsubishi microcomputers 4551 group single-chip 4-bit cmos microcomputer for infrared remote control transmitter
rev. rev. no. date 1.0 first edition 971130 revision description list 4551 group data sheet (1/1) revision description


▲Up To Search▲   

 
Price & Availability of M34551M4-XXXFP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X